Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing network request to specific network #914

Merged
merged 7 commits into from
Sep 29, 2022
Merged

Conversation

xz-dev
Copy link
Contributor

@xz-dev xz-dev commented Sep 28, 2022

I set wifi only, in the first few days, my home wifi dns broken when I don't know, but it connect.
So, syncthing is running and android system routing all the request to mobile data, and consumed my entire traffic allowance at one night.
The patch is for the situation.

@xz-dev xz-dev marked this pull request as draft September 28, 2022 08:22
@xz-dev
Copy link
Contributor Author

xz-dev commented Sep 28, 2022

Need clear binding when stop syncthing

@Catfriend1
Copy link
Owner

Cool, thanks for working on it :-).

@xz-dev xz-dev marked this pull request as ready for review September 28, 2022 10:42
@xz-dev
Copy link
Contributor Author

xz-dev commented Sep 28, 2022

Need clear binding when stop syncthing

Done. but only working on SDK 23 and up

@Catfriend1
Copy link
Owner

Need clear binding when stop syncthing

Done. but only working on SDK 23 and up

That's no problem.

@Catfriend1
Copy link
Owner

Catfriend1 commented Sep 29, 2022

I also think bindNetwork will not be executed if run conditions are changed by the user while Syncthing is running. But given that this is expected to rarely happen, mainly on initial setup, we can skip writing code for it now and if it really turns out important do it later. Plus, using mobile data is default off.

@xz-dev
Copy link
Contributor Author

xz-dev commented Sep 29, 2022

I also think bindNetwork will not be executed if run conditions are changed by the user while Syncthing is running. But given that this is expected to rarely happen, mainly on initial setup, we can skip writing code for it now and if it really turns out important do it later. Plus, using mobile data is default off.

Yeah, I agree with you. Basically, I just want make my code as simple as possible.

@Catfriend1
Copy link
Owner

Perfect. Any more testing needed? Or should I merge this as is?

@Catfriend1 Catfriend1 merged commit 18dde19 into Catfriend1:main Sep 29, 2022
@Catfriend1
Copy link
Owner

Catfriend1 commented Sep 29, 2022

Thanks for your contribution :-). 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants