Натолкнулся на проект usque. Это клиент для протокола masque от cloudflare.
Может создать интерфейс tun или работать как sock5/http прокси
В общем рекомендую к использованию
Натолкнулся на проект usque. Это клиент для протокола masque от cloudflare.
Может создать интерфейс tun или работать как sock5/http прокси
В общем рекомендую к использованию
По моему мнению, одна из достопримечательностей usque: это возможность менять SNI, который используется для подключения к серверу MASQUE Cloudflare, и то, что их сервер не будет ругаться на то, что этот SNI не тот, который используется по канону.
[…] QUIC mandates TLS v1.3 so we send a ClientHello with
client-masque.cloudflareclient.com
in the SNI field. Some firewalls may block this. You can change the SNI by specifying-s
flag to any domain (based on my experience) and the connection will still work. Please note that this is definitely not Cloudflare’s intended use case (just a nice side effect).
То есть, даже если SNI, который указан по умолчанию заблокирован, можно поставить любой другой SNI сайта, который находится за Cloudflare (или же выставить любое другое значение, которое не является доменом, потому что сервер не проверяет SNI). Но как говорит автор, это, скорее всего, не фича, а баг, так что надеяться только на это будет рискованно.
писал про постоянные “реконекты”
оказалось если ничего не запрашивается гдето 5 минут
то связь рвется или клиентом или CF
у себя включил проверку https://1.1.1.1/cdn-cgi/trace
через прокси каждые 1+ минуты
2025/04/09 22:27:32 Connected to MASQUE server
2025/04/09 22:33:40 handling stream failed: H3_NO_ERROR
2025/04/09 22:33:40 writing to stream failed: use of closed network connection
2025/04/09 22:33:40 Tunnel connection lost: failed to read from IP connection: stream 0 canceled by remote with error code 256. Reconnecting…
2025/04/09 22:33:42 Connected to MASQUE server
2025/04/09 22:38:42 handling stream failed: H3_NO_ERROR
2025/04/09 22:38:42 Tunnel connection lost: failed to read from IP connection: stream 0 canceled by remote with error code 256. Reconnecting…
2025/04/09 22:38:42 writing to stream failed: use of closed network connection
2025/04/09 22:38:43 Connected to MASQUE server
2025/04/09 22:43:43 handling stream failed: H3_NO_ERROR
2025/04/09 22:43:43 Tunnel connection lost: failed to read from IP connection: stream 0 canceled by remote with error code 256. Reconnecting…
2025/04/09 22:43:43 writing to stream failed: use of closed network connection
2025/04/09 22:43:45 Connected to MASQUE server
Автор написал об этой проблеме в readme:
remote end disconnects: If you are inactive for a while, the remote end might disconnect you with a
H3_NO_ERROR
error. Similar behavior was observed earlier on their well studiedWireGuard
implementation where too long open connections with not significant network activity were disconnected. The official apps just reconnect once that happens, therefore I implemented a similar behavior. Therefore if you see disconnects, don’t worry, it’s probably just the remote end. The tool will reconnect automatically
Если клиент неактивен некоторое время, сервер отключит клиента с “ошибкой” H3_NO_ERROR
. Офицальные клиенты просто переподключаются в такой ситуации, и автор сделал тоже самое в usque.
спасибо. ставил больше для тестов (как ARTI/TOR в свое время)
к сожалению RTFM особо не читал
сильно не хватает --scan
warp+
time=2025-04-09T20:17:15.988+03:00 level=ERROR msg=“ping error” subsystem=scanner addr=162.159.192.225 error=“read udp 192.168.1.111:51292->162.159.192.225:3581: i/o timeout”
time=2025-04-09T20:17:22.889+03:00 level=ERROR msg=“ping error” subsystem=scanner addr=162.159.195.199 error=“read udp 192.168.1.111:51296->162.159.195.199:4500: i/o timeout”
time=2025-04-09T20:17:29.505+03:00 level=ERROR msg=“ping error” subsystem=scanner addr=162.159.193.45 error=“read udp 192.168.1.111:51299->162.159.193.45:7281: i/o timeout”
time=2025-04-09T20:17:36.114+03:00 level=ERROR msg=“ping error” subsystem=scanner addr=188.114.99.111 error=“read udp 192.168.1.111:51303->188.114.99.111:1002: i/o timeout”
time=2025-04-09T20:17:42.892+03:00 level=ERROR msg=“ping error” subsystem=scanner addr=188.114.98.239 error=“read udp 192.168.1.111:51306->188.114.98.239:7152: i/o timeout”
Достаточно --ipv6
usque.exe socks --help
Dual-stack SOCKS5 proxy with optional authentication. Doesn't require elevated privileges.
Usage:
usque socks [flags]
Flags:
--bind string Address to bind the SOCKS proxy to (default "0.0.0.0")
--connect-port int Used port for MASQUE connection (default 443)
--dns stringArray DNS servers to use inside the MASQUE tunnel (default [9.9.9.9,149.112.112.112,2620:fe::fe,2620:fe::9])
--dns-timeout duration Timeout for DNS queries on a specific server (tries the next server if exceeded) (default 2s)
--help help for socks
--initial-packet-size uint16 Initial packet size for MASQUE connection (default 1242)
--ipv6 Use IPv6 for MASQUE connection
--keepalive-period duration Keepalive period for MASQUE connection (default 30s)
--mtu int MTU for MASQUE connection (default 1280)
--no-tunnel-ipv4 Disable IPv4 inside the MASQUE tunnel
--no-tunnel-ipv6 Disable IPv6 inside the MASQUE tunnel
--password string Password for proxy authentication (specify both username and password to enable)
--port string Port to listen on for SOCKS proxy (default "1080")
--reconnect-delay duration Delay between reconnect attempts (default 1s)
--sni-address string SNI address to use for MASQUE connection (default "consumer-masque.cloudflareclient.com")
--username string Username for proxy authentication (specify both username and password to enable)
Global Flags:
--config string config file (default is config.json) (default "config.json")
API выдаёт пока только один пир, который в конфиге и записан, с возможными портами:
443
500
1701
4500
4443
8443
8095
блин. надо всё таки читать документацию ;
я только usque.exe --help посмотрел и всё
пока полет нормальный. но если/когда забанят единственный IPv4 то оппа ?
или есть еще какие то опции запуска ЧЕРЕЗ другой socks ?!
как в том же opera-proxy
-proxy string
sets base proxy to use for all dial-outs. Format: <http|https|socks5|socks5h>
del
Методом тыка можно обнаружить, что помимо 162.159.198.1
, который стоит по умолчанию, можно подключиться к, например: 162.159.198.2
, 162.159.199.1
, 162.159.199.2
. Скорее всего, есть и другие IP, к которым можно будет подключиться.