Open Bug 1808692 Opened 1 year ago Updated 3 months ago

SOCKS implementation does not support UDP

Categories

(Core :: Networking: Proxy, defect, P2)

Firefox 108
defect

Tracking

()

UNCONFIRMED

People

(Reporter: linxin19812012, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0

Steps to reproduce:

  1. Prepare a SOCKS5 proxy server

  2. Open about:preferences in the browser and click "Network Settings"

  3. Fill in "Manual proxy configuration", "SOCKS Host", "Port"

  4. Select "Proxy DNS when using SOCKS v5"

  5. Open a webrtc test page, for example https://ip.voidsec.com/

Actual results:

The "Web RTC:" item on the page, the relevant information is empty

Expected results:

The "Web RTC:" item on the page displays the address information of webrtc

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking
Product: Firefox → Core

Randell, could you take a look at this one?

Flags: needinfo?(rjesup)
Blocks: necko-proxy
Severity: -- → S3
Priority: -- → P2

I wonder if it's a limitation of wanting to use UDP for WebRTC, but not being capable of doing that over SOCKS5 possibly as a result of the lack of implementation.

It's definitely not a global setting problem breaking everything at least.
I use containers, and the ones with a proxy specified can't use WebRTC while the functionality remains working outside of those containers.

Yes, I think WebRTC proxying doesn't work when a proxy is in use.
The SOCKSIOLayer does not have a method for sendto and recvfrom, so presumably it can't proxy UDP traffic.
This limitation is also present in (Chrome's SOCKS implementation](https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md#socksv5-proxy-scheme).

Flags: needinfo?(rjesup)

This seems the bug preventing us from fixing this Mullvad Browser issue: WebRTC leaks UDP traffic outside socks5 proxy .

If we set media.peerconnection.ice.proxy_only_if_behind_proxy to true we just break WebRTC.

Is there any hope for a fix or a work-around suggestion?

Thanks in advance!

Looping in webrtc team

Flags: needinfo?(jmathies)
Flags: needinfo?(docfaraday)

Correct, we have not implemented UDP proxy support. Right now, if you want a proxy, you need to use TCP.

Flags: needinfo?(docfaraday)
Flags: needinfo?(jmathies)

Moving bug to Core/Networking: Proxy.

Component: Networking → Networking: Proxy

Moving bug to Core/Networking: Proxy

Summary: After the browser sets the socks5 proxy, the webrtc function cannot be used → SOCKS implementation does not support UDP

Are you planning to add UDP support to SOCKS proxying?

It is on Necko's roadmap, so we will get to it eventually. But currently there is no estimate on when we start working on this. We are definitely taking patches and would help out mentoring if anyone is interested in implementing it.

Thx.

No longer duplicate of this bug: 1882071
You need to log in before you can comment on or make changes to this bug.