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

supports SOCKS5 udp relay #523

Closed
wants to merge 2 commits into from
Closed

supports SOCKS5 udp relay #523

wants to merge 2 commits into from

Conversation

shenm233
Copy link

No description provided.

@M66B
Copy link
Owner

M66B commented Aug 20, 2019

Thanks for the pull request, it will take me some time to review this.

At this moment I have one question: is UDP traffic forwarded through the SOCKS5 proxy being filtered by NetGuard? At first glance it is not, which would defeat the purpose of NetGuard.

@shenm233
Copy link
Author

Yes, it is implemented just as same as TCP traffic forwarded through the proxy.

@M66B
Copy link
Owner

M66B commented Aug 21, 2019

I am considering to merge this. Do you agree that I get the copyright of the source code and that the source code will be licensed as GPLv3 as outlined here: https://github.com/M66B/NetGuard/#contributing ?

@shenm233
Copy link
Author

shenm233 commented Aug 22, 2019 via email

@M66B
Copy link
Owner

M66B commented Aug 22, 2019 via email

@xDragonZ
Copy link

Currently UDP traffic is being ignored and dropped by netguard?

@M66B
Copy link
Owner

M66B commented Aug 22, 2019

@xDragonZ no it is not. UDP traffic can be blocked, just like TCP traffic.

@tlaurion
Copy link

tlaurion commented Aug 31, 2019

@M66B
UDP traffic cannot be proxied through orbot. Merging this would be a first step into making UDP traffic not go straight to the internet for people requiring added anonymity.

I would definitely play with that feature and ROM projects like e.foundation or Replicant would also benefit of a feature like this to educate people with application network behaviors ad hoc. e.foundation could integrate your app with safe defaults and proxy internet TCP traffic through orbot by default, while UDP traffic is still questionable.

I would love to see this feature merged.

@licaon-kter
Copy link
Contributor

@tlaurion Netguard already can block UDP, this PR is not about that.

@tlaurion
Copy link

tlaurion commented Aug 31, 2019

@licaon-kter : No. I'm not talking about blocking UDP, but proxying UDP traffic just like TCP traffic can be proxied so that all TCP traffic goes through orbot (tor), as an example.

By forcing NetGuard as an always on VPN on both working and main profiles, this guarantee that the TCP traffic doesn't leak to connected network in clear. The same can be done right now for DNS traffic, let them be TCP/UDP , through port forwarding, see screenshot.

What to do with this UDP traffic and where/when to proxy it is another question, but this PR would be a good first step in that direction, let it be for I2P or other anonymization networks permitting proxying.

Attached are DNS leak tests. No, I'm not in Netherlands.
Netguard-DNS-leak-test

Attached is port forwarding config for this DNS redirection to work, even for UDP, where ports are known, which is not the case, for example under Signal calls.
Netguard-Port_forward-config

Attached is TCP proxy config, forcing all TCP traffic through orbot. Hope use case is clearer while not completely figured out.
Netguard-proxy-config

@licaon-kter
Copy link
Contributor

All this setup and then you use Signal and Frost for Facebook...that's funny. ;)

@tlaurion
Copy link

tlaurion commented Aug 31, 2019

All this setup and then you use Signal and Frost for Facebook...that's funny. ;)

Unfortunately, yes. Need message notification for personal/professional interactions with the rest of the world... Didn't choose to live in a cave, yet.

You know, confidentiality, conviviality and availability triangle. Gotta promote something enough convivial to reach everyone. And something enough available and confidential enough (ephemeral messages: not trusting devices) to have a reasonably confidential channel to exchange secrets without asking everybody to be geeks...

I haven't found anything perfect, yet. This is out of scope, but i'm always ready for better suggestions. I still think ephemeral messages on something available and convivial as Signal to be the best compromise. For Facebook, I can't justify... I still want to have contacts with my family and friends :P

Anyway! I hope this clarifies the need for some threat models.

Things are moving fast and forward for the [secure smartphone realm](https://zn.amorgan.xyz/1DMb3CV66qZPwJqkgm4z12nu8BrAwDoD4g/?Post:27:Experiments+on+the+Note+II+(N7100+[codename+t03g],+still+maintained+LineageOS+14.1+for+MicroG+by+e.foundation!!!).

TLDR: It would be nice that the most interesting tool, pedagogically speaking (Yes, NetGuard here), already supports what will need to be enforced for secured communications.

That's where I stand :)

@shenm233
Copy link
Author

shenm233 commented Sep 1, 2019

Without UDP proxies, it would expose original IP address to third party, which breaks anonymity. And some network censorship restricted regions, they will block all traffic to some IPs, however TCP proxying is no enough, with UDP proxying makes website or other services more accessible.

@licaon-kter
Copy link
Contributor

What website do you use over UDP?

@shenm233
Copy link
Author

shenm233 commented Sep 2, 2019

However WebRTC can use UDP for transport, I don't know which websites use this, also some services or apps (for example, video chatting) may use UDP traffic.
You can learn more about WebRTC leakage.

Repository owner deleted a comment from DI555 Sep 20, 2019
@seonwoolee
Copy link

Any updates?

@shenm233, would it be possible for you to upload an apk of your fork as a release under your version of the repo? I am quite interested in proxying UDP traffic.
I tried compiling the app from source but I have never compiled an Android app before and ran into errors that I didn't know how to handle.

@sudomain
Copy link

Could this be merged if the feature was labeled 'experimental' ? Maybe with an addition to the FAQ about how experimental features won't always work?

Copy link

@SsomsakTH SsomsakTH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

@jgoerzen
Copy link

jgoerzen commented May 4, 2020

I would just like to add that UDP is going to become much, much more prominent in the near future, as HTTP/3 uses QUIC which is UDP-based. It's not on by default in any browser yet, but it is present in all major browsers. Mobile most definitely stands to benefit, so this is going to be key for Netguard.

@rullskidan
Copy link

Why has this not been merged yet? I really need this feature.

@seonwoolee
Copy link

Bump. I have been looking forward to this feature.

Repository owner locked and limited conversation to collaborators Sep 19, 2020
@M66B M66B closed this Aug 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants