2

Curl 的 –socks5 與 –socks5-hostname – Gea-Suan Lin's BLOG

 2 years ago
source link: https://blog.gslin.org/archives/2022/03/31/10636/curl-%e7%9a%84-socks5-%e8%88%87-socks5-hostname/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Curl 的 --socks5 與 --socks5-hostname

SOCKS5 支援用 hostname 連線,而且是透過 SOCKS server 查 IP address,然後查資料的時候翻到「Curl: Re: ��: Why resolve the dns locally when using a socks5 proxy」這篇,發現 Curl--socks5 原來有雷,一般人會想要用的應該是 --socks5-hostname 才對 XDDD

這是 --socks5

Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed at port 1080.

而這是 --socks5-hostname

Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If the port number is not specified, it is assumed at port 1080.

另外也有 --socks4--socks4a,不過 SOCKS4a 的協定最主要就是加上 hostname 的連線:

SOCKS4a extends the SOCKS4 protocol to allow a client to specify a destination domain name rather than an IP address; this is useful when the client itself cannot resolve the destination host's domain name to an IP address.

然後隔壁棚的 socks5://socks5h:// 也有異曲同工之妙...

Related

透過 SOCKS5 界面連進 WireGuard 網段的軟體 wireproxy

在 Hacker News 上看到「A userspace WireGuard client that exposes itself as a proxy (github.com/octeep)」看到這個有趣的東西,可以把自己當作是一個 WireGuard client,然後透過 SOCKS5 界面讓使用者使用... 專案則是在 GitHub 上的「Wireguard client that exposes itself as a socks5 proxy」這邊可以看到。 除了軟體本身有支援 SOCKS5 的可以用以外,另外可以搭配透過 LD_PRELOAD 把 TCP 連線都轉進 SOCKS5 服務的套件來用,像是 tsocks 或是 redsocks 這種工具。 然後這包東西是用 Golang 寫的,好像剛好可以拿來練手包 Ubuntu PPA...

March 29, 2022

In "Computer"

Mac 上讓 SSH 走 Socks5 的方式

在泰國住的飯店提供頗快的網路: 不過到 HiNet 看起來應該是有繞到美國之類的地區? gslin@Gea-Suans-MacBook-Pro [~] [08:16/W4] mtr --report 168.95.1.1 Start: 2019-04-07T08:16:33+0700 HOST: Gea-Suans-MacBook-Pro.local Loss% Snt Last Avg Best Wrst StDev 1.|-- 10.10.20.1 0.0% 10 1.8 2.0 1.3 3.1 0.6 2.|-- node-iyp.pool-101-108.dyn 0.0% 10 3.9 3.6 2.7 4.5 0.6 3.|-- 172.17.36.105 0.0% 10 3.2 4.1 3.2 8.3 1.5 4.|-- 203.113.44.205…

April 7, 2019

In "Cloud"

Firefox over SSH Tunnel

在北京上網時,有些網站會連不上,大多數的情況下可以透過 PuTTY 建 SSH Tunnel,把 HTTP 連線透過 PuTTY 加密就可以了。但是有時候是因為 domain 解出不同的 IP address 而造成連不上,像是 totorogo.dyndns.org。 這時候就要用 about:config 把 network.proxy.socks_remote_dns 改成 true,要求 Firefox 將查詢 DNS 的需求透過 PuTTY 所建出來的 Socks5 Tunnel 送出詢問,目前看起來還蠻正常的,暫時先這樣用看看...

March 18, 2008

In "Computer"

a611ee8db44c8d03a20edf0bf5a71d80?s=49&d=identicon&r=gAuthor Gea-Suan LinPosted on March 31, 2022Categories Computer, DNS, Murmuring, Network, SoftwareTags dns, hostname, proxy, query, socks, socks4, socks4a, socks5, socks5h

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK