haxpor / Potatso

Potatso is an iOS client that implements Shadowsocks proxy with the leverage of NetworkExtension framework. ***This project is unmaintained, try taking a look at this fork https://github.com/shadowcoel/shadowcoel instead.
GNU General Public License v3.0
2.04k stars 1.37k forks source link

Must reconnect vpn when change proxy server? #66

Open zhkufish opened 6 years ago

zhkufish commented 6 years ago

There are any ways to change proxy server without reconnect vpn. I saw shadowrockets didn't need to reconnect when change proxy server.

haxpor commented 6 years ago

Hey, it seems not to reconnect (I will make sure checking the code again). By the way, what do you think, should it try to re-connect once you change the proxy?

zhkufish commented 6 years ago

You can checking the code. If not re-connect. It still connect to the last server after you change the proxy. I serach on google. But I didn't found any ways.

haxpor commented 6 years ago

Ok, I checked the behavior via app and can confirm like what you described. Added to fix list.

so898 commented 6 years ago

@haxpor @zhkufish I do not think the current code support this feature. This function could be build into the project with a lot of modify of the tunnel part. The current init function in tunnel part now can only apply one ss configuration. If we want to support this feature, we should modify the ProxyManager, add functions to stop old ss-local thread and start a new one with new ss configuration. Because of the random port used by ss-local thread, the Privoxy thread and Antinat thread should be restart with new ss port in order.

ghost commented 6 years ago

I agree