Jigsaw-Code / outline-server

Outline Server, developed by Jigsaw. The Outline Server is a proxy server that runs a Shadowsocks instance and provides a REST API for access key management.
https://getoutline.org/
Apache License 2.0
5.76k stars 777 forks source link

Is there a UDP error workaround? #201

Open 4044ever opened 6 years ago

4044ever commented 6 years ago

Outline works mostly wonderful for me. But it happened a few times on some wifi networks that I can't connect due to UDP error.

Is there are workaround for this issue?

(I posted it under 'server', I believe the solution would be with the server rather than the client. Correct me if wrong.)

screenshot_2018-04-16-20-32-50-794_org outline android client

able8 commented 6 years ago

Sometimes, I also have this problem.
"Unfortunately, if you are on a network that does not allow you to communicate over UDP to the port in your Outline access key, then you cannot connect using the Outline client for Android, iOS, or MacOS. You may be able to connect using a compatible Shadowsocks client that does not require UDP support."

fortuna commented 6 years ago

I'm sorry for the trouble. I've seen this issue before. I think we need a mode where the proxy still works if UDP is not available.

fortuna commented 6 years ago

@4044ever, are you able to connect to your server using Max Lv's shadowsocks client? https://play.google.com/store/apps/details?id=com.github.shadowsocks

I wonder if things will just work if we ignore the UDP check

fortuna commented 6 years ago

We can't just ignore the UDP check: DNS requests will still time out. We need to handle that. It seems we may be able to intercept all DNS requests and force them to go over TCP, which would allow for connectivity, though with some performance degradation (DNS over TCP rather than UDP).

fortuna commented 6 years ago

Here is an implementation proposal from @bemasc for the Outline client:

  1. Run a DNS forwarder locally that talks to a DNS-over-TLS server (e.g. Stubby)
  2. Configure the VPN to use the localhost DNS forwarder
  3. Disable UDP

This should have a lot better performance than forcing regular DNS over TCP. And Stubby probably has optimizations to have sockets open with the target server, mitigating connection costs.

@alalamav How hard do you think implementing that would be? @trevj FYI

kh-rawad commented 5 years ago

when I disable the Ubuntu firewall it works can anyone help with configuring ubuntu firewall ??