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

Support iptables #41

Closed
hamedsbt opened this issue Dec 7, 2020 · 7 comments
Closed

Support iptables #41

hamedsbt opened this issue Dec 7, 2020 · 7 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@hamedsbt
Copy link

hamedsbt commented Dec 7, 2020

Hello, thank you developer for awesome project.
Many advanced users has ROOTED device now-day and it very useful to add ability iptables traffic rule to redirect all traffic through reverse proxy instead VPN mod for less battery usage.
Thank you again!

@krlvm
Copy link
Owner

krlvm commented Dec 7, 2020

Have you tried proxy mode in settings?

@hamedsbt
Copy link
Author

hamedsbt commented Dec 7, 2020

Yes, but may app does not support proxy settings, such as official youtube app.

@krlvm
Copy link
Owner

krlvm commented Dec 7, 2020

Can't you configure iptables manually?
(maybe a stupid question, I'm not familiar with it)

@hamedsbt
Copy link
Author

hamedsbt commented Dec 7, 2020

I'm not very professional iptables user too. it may help: https://tldp.org/HOWTO/TransparentProxy-6.html

@krlvm
Copy link
Owner

krlvm commented Dec 7, 2020

I think you can use this, but I haven't tested:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 127.0.0.1:8085
iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to 127.0.0.1:8085
To get traffic back execute then:
iptables -t nat -A POSTROUTING -p tcp -d 127.0.0.1:8085 --dport 80 -j SNAT --to-source 127.0.0.1:8085
iptables -t nat -A POSTROUTING -p tcp -d 127.0.0.1:8085 --dport 443 -j SNAT --to-source 127.0.0.1:8085

127.0.0.1:8085 is the default proxy server address, replace it if you've changed it.

@hamedsbt
Copy link
Author

hamedsbt commented Dec 7, 2020

Thank you for your try, but I prefer this process handle with app GUI as much as simple and stable.

@krlvm
Copy link
Owner

krlvm commented Dec 7, 2020

I don't want to root my device, so I don't think this will be supported in the future.

@hamedsbt hamedsbt closed this as completed Dec 7, 2020
@krlvm krlvm changed the title Support [ROOT] device with iptables traffic redirection for less battery usage Support iptables Dec 7, 2020
@krlvm krlvm added enhancement New feature or request question Further information is requested labels Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants