Homebr3w icon indicating copy to clipboard operation
Homebr3w copied to clipboard

Doesn't honor 3DS' proxy settings

Open rctgamer3 opened this issue 7 years ago • 18 comments

I have all 3DS data routed through a local proxy to control what my 3DS can access or not. However, Homebr3w doesn't check at all for a set proxy.

rctgamer3 avatar Nov 26 '16 12:11 rctgamer3

Possibly lpp-3ds' fault. Is it like this for any lpp apps, could you test this? @Rinnegatamante, does LPP-3ds use a system defined proxy at all or do I have to set something for that to happen manually?

Wolvan avatar Nov 26 '16 14:11 Wolvan

At least when i used to update lpp-3ds, ctrulib didn't have any function related to proxies.

Rinnegatamante avatar Nov 26 '16 17:11 Rinnegatamante

what about that https://github.com/smealum/ctrulib/blob/master/libctru/source/services/httpc.c#L90 Could that be a thing that gives you proxy access?

Wolvan avatar Nov 26 '16 19:11 Wolvan

Possibly but i don't have enough time to give it a try.

Rinnegatamante avatar Nov 27 '16 23:11 Rinnegatamante

Calling @ksanislo into this for his httpc knowledge

Wolvan avatar Nov 27 '16 23:11 Wolvan

@Wolvan & @Rinnegatamante It looks like the 0 for the use proxy bool is hardcoded here at https://github.com/Rinnegatamante/lpp-3ds/blob/master/source/luaNetwork.cpp#L140 to false... You can probably just switch it to 1 and recompile and see if that does the trick. I'm not sure if there's some mechanism to check for a default proxy before you attempt to enable it though. So it may need some kind of check to get the true/false value needed first.

ksanislo avatar Nov 28 '16 00:11 ksanislo

I can provide a test version with it set to 1 (true) if needed. Let me know @Wolvan

Rinnegatamante avatar Dec 06 '16 23:12 Rinnegatamante

That would be very much appreciated, thanks Rin.

Wolvan avatar Dec 06 '16 23:12 Wolvan

https://www.rinnegatamante.it/lpp-3ds_proxy.3dsx

Rinnegatamante avatar Dec 06 '16 23:12 Rinnegatamante

Can I get the elf file perhaps?

Wolvan avatar Dec 07 '16 00:12 Wolvan

https://www.rinnegatamante.it/lpp-3ds_proxy.elf

Rinnegatamante avatar Dec 07 '16 00:12 Rinnegatamante

@rctgamer3 can you try https://a.pomf.cat/svuipe.cia ? Just build that with Rin's proxy version

Wolvan avatar Dec 07 '16 00:12 Wolvan

Not sure if related, but (with that .cia) i get Error: [string"?"]:568: bad argument #3 to 'requestString' (number expected, got string) on startup after the loading config message.

rctgamer3 avatar Dec 11 '16 02:12 rctgamer3

You do have a proxy set though, right?

Wolvan avatar Dec 11 '16 02:12 Wolvan

Yes, I do have a proxy set, I haven't changed/disabled my proxy settings in a long time (set to my computer's DNS address and port 8888). No traffic shows up.

rctgamer3 avatar Dec 11 '16 09:12 rctgamer3

According to ctrulib header file ( https://github.com/smealum/ctrulib/blob/master/libctru/include/3ds/services/httpc.h#L53 ), use_defaultproxy should be set to 0 to use default proxy (so standard lpp-3ds should already use default proxy in system settings) :/

Rinnegatamante avatar Dec 11 '16 09:12 Rinnegatamante

I'm pretty sure that header comment is wrong then. Because this is what it really does in the ctrulib source:

if(use_defaultproxy==0)return 0;

ret = HTTPC_SetProxyDefault(context->servhandle, context->httphandle);

ksanislo avatar Dec 11 '16 18:12 ksanislo

Bump

rctgamer3 avatar Dec 08 '20 22:12 rctgamer3