domosekai / turnout

Transparent and HTTP proxy with smart routing solution. Automatic selection between direct route and proxies, without the need to maintain any list.
MIT License
20 stars 8 forks source link

Please Add socks5 local listen port #3

Open bhzhu203 opened 2 years ago

bhzhu203 commented 2 years ago

Please Add socks5 local listen port (add local socks fuction). The default http proxy listen port can not forward the DNS requests and the http proxy is not better for the browser .Thanks

domosekai commented 2 years ago

What is your concern regarding using http proxy? This program is not supposed to forward UDP traffic, including DNS.

bhzhu203 commented 2 years ago

What is your concern regarding using http proxy? This program is not supposed to forward UDP traffic, including DNS.

Sometimes using the HTTP proxy of turnout can not reach the some of the websites such as github .But after restarting the turnout it will be fine . I think it just went through "Route 1" not the "Route 2" (directly using "Route 2" perfectly)

turnout -slow 200 performance better than turnout default

I find that the slow connection will return to ROUT1 after minutes agian and not go back to ROUT2

2021/11/30 16:32:29.609933 H 77: First 517 bytes from client 2021/11/30 16:32:29.609943 H 77: TLS 1.3 SNI github.com 2021/11/30 16:32:29.609950 H 77: EXT Connections to github.com:443 exist. Select route 1 server 1 2021/11/30 16:32:29.609969 H 77: 1 Dialing to tcp github.com:443 2021/11/30 16:32:29.683490 H 77: 1 TCP connection established 2021/11/30 16:32:29.753687 H 77: 1 First 1424 bytes from server. TTFB 70 ms. 2021/11/30 16:32:29.753726 H 77: 1 TLS 1.3 Server Hello 2021/11/30 16:32:29.753750 H 77: 1 Reset counter for github.com:443 2021/11/30 16:32:29.753797 H 77: CON 1 Continue tcp 10.10.10.93:60572 -> 20.205.243.166:443 2021/11/30 16:32:41.910296 H 75: Local connection closed. Sent 1798 bytes. 2021/11/30 16:32:41.910348 H 75: 1 Remote connection closed. Received 873 bytes in 75.2 s. 2021/11/30 16:32:46.736180 H 60: 1 Deleted route to avatars.githubusercontent.com:443 2021/11/30 16:32:49.735356 H 59: 1 Deleted route to github.com:443 2021/11/30 16:32:49.735378 H 72: 1 Deleted route to api.github.com:443 2021/11/30 16:32:52.695861 H 76: * 1 Deleted route to wx.qq.com:443 ❰bhzhu❙~/Desktop/scripts/startup❱✔≻

domosekai commented 2 years ago

Well, github may be not stable over your route 1. Then I suggest you use the host list file (e.g. 2 *github*). That will disable the automatic routing which always starts from route 1. Every one's network environment is different and you need to tune and find the parameters that work with you best.

bhzhu203 commented 2 years ago

What is your concern regarding using http proxy? This program is not supposed to forward UDP traffic, including DNS.

BY the way .I have setup the shadowsocks client with socks5 TCP port . And the firefox also have a option to forward DNS request via socks5 . I think socks5 can convert DNS UDP request to TCP socks5 DNS request to upstream.

domosekai commented 2 years ago

What is your concern regarding using http proxy? This program is not supposed to forward UDP traffic, including DNS.

BY the way .I have setup the shadowsocks client with socks5 TCP port . And the firefox also have a option to forward DNS request via socks5 . I think socks5 can convert DNS UDP request to TCP socks5 DNS request to upstream.

I am not sure what you are asking for. A SOCKS5 proxy may or may not handle hostnames directly. If it can't handle it, the client (such as a browser) must do DNS resolution itself. But an HTTP proxy always accepts hostnames. So turnout is already doing what you need.

bhzhu203 commented 2 years ago

What is your concern regarding using http proxy? This program is not supposed to forward UDP traffic, including DNS.

BY the way .I have setup the shadowsocks client with socks5 TCP port . And the firefox also have a option to forward DNS request via socks5 . I think socks5 can convert DNS UDP request to TCP socks5 DNS request to upstream.

I am not sure what you are asking for. A SOCKS5 proxy may or may not handle hostnames directly. If it can't handle it, the client (such as a browser) must do DNS resolution itself. But an HTTP proxy always accepts hostnames. So turnout is already doing what you need.

Thank you very much ! The turnout with host list file is more stable now. "host list" is good choice for expert user really.

But for newbie it is better to "zero config " and automic routing. I have experienced a good project/tool with a good automic routing performance : https://github.com/vzex/dog-tunnel/blob/udpVersion/HowToUse.txt dog-tunnel udpVersion (KCP/tunnel) -smartN 3