Wolvan / Homebr3w

A Homebrew browser for 3ds
MIT License
50 stars 8 forks source link

Doesn't honor 3DS' proxy settings #24

Open rctgamer3 opened 7 years ago

rctgamer3 commented 7 years ago

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.

Wolvan commented 7 years ago

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?

Rinnegatamante commented 7 years ago

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

Wolvan commented 7 years ago

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?

Rinnegatamante commented 7 years ago

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

Wolvan commented 7 years ago

Calling @ksanislo into this for his httpc knowledge

ksanislo commented 7 years ago

@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.

Rinnegatamante commented 7 years ago

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

Wolvan commented 7 years ago

That would be very much appreciated, thanks Rin.

Rinnegatamante commented 7 years ago

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

Wolvan commented 7 years ago

Can I get the elf file perhaps?

Rinnegatamante commented 7 years ago

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

Wolvan commented 7 years ago

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

rctgamer3 commented 7 years ago

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.

Wolvan commented 7 years ago

You do have a proxy set though, right?

rctgamer3 commented 7 years ago

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.

Rinnegatamante commented 7 years ago

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) :/

ksanislo commented 7 years ago

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);
rctgamer3 commented 3 years ago

Bump