apernet / hysteria

Hysteria is a powerful, lightning fast and censorship resistant proxy.
https://v2.hysteria.network/
MIT License
14.03k stars 1.57k forks source link

Sites not opening in Chrome due connection to trying to open with IPv6 #703

Closed Kingphoenix666 closed 10 months ago

Kingphoenix666 commented 10 months ago

Hi, I did hysteria2 connection with tutorial from this site https://cscot.pages.dev/2023/09/07/nekoray-hysteria2

There were two differences in the implementation of the steps by me: 1- --keylength ec-256 —-> --keylength ec-384 2- Port 443 —-> port 20

After completing the steps, I can connect to the server with both NekoRay and V2rayN software from the client, but there is a problem that in PC-windows10, it seems that the connection by default tries to open a site in the Chrome browser on ipv6 and because my ISP does not support ipv6 [IRAN], no site opens. This problem does not exist with the Firefox browser and working very well and all sites are opened.

To make sure there is no problem from the client side in PC or Chrome browser, I created a Reality connection on the xray-core with the X-UI [FranzKafkaYu] panel on the server at the same time, and I had no problem opening the pages in the Chrome browser.

Also i disable Ipv6 in server side ---> no fix Also i disable Ipv6 on PC network in client side ---> no fix Also i change Nameserver in resolv.conf in server side ---> no fix

error logs in V2rayN with Hysteria2 connection: 2023-09-20T03:20:03+03:30 ERROR SOCKS5 TCP error {"addr": "127.0.0.1:61284", "reqAddr": "[2001:67c:4e8:f004::b]:443", "error": "readfrom tcp 127.0.0.1:9999->127.0.0.1:61284: dial error: dial tcp6 [2001:67c:4e8:f004::b]:443: connect: cannot assign requested address"}

config.Yaml server: listen: :20

tls: cert: /etc/ssl/private/fullchain.cer key: /etc/ssl/private/private.key

auth: type: password password: *****

resolver: type: udp tcp: addr: 8.8.8.8:53 timeout: 4s udp: addr: 8.8.4.4:53 timeout: 4s tls: addr: 1.1.1.1:853 timeout: 10s sni: cloudflare-dns.com insecure: false https: addr: 1.1.1.1:443 timeout: 10s sni: cloudflare-dns.com insecure: false

acl: inline:

config.Yaml client: server: SERVERIP:20 auth: ***** transport: type: udp udp: hopInterval: 30s tls: sni: MY DOMAIN ON SERVER Behind CDN insecure: false resolver: type: udp tcp: addr: 8.8.8.8:53 timeout: 4s udp: addr: 8.8.4.4:53 timeout: 4s tls: addr: 1.1.1.1:853 timeout: 10s sni: cloudflare-dns.com insecure: false https: addr: 1.1.1.1:443 timeout: 10s sni: cloudflare-dns.com insecure: false bandwidth: up: 100 mbps down: 100 mbps quic: initStreamReceiveWindow: 8388608 maxStreamReceiveWindow: 8388608 initConnReceiveWindow: 20971520 maxConnReceiveWindow: 20971520 maxIdleTimeout: 30s keepAlivePeriod: 10s disablePathMTUDiscovery: false fastOpen: true lazy: true socks5: listen: 127.0.0.1:9999 disableUDP: false http: listen: 127.0.0.1:10000

tobyxdd commented 10 months ago

Can you explain exactly how you use it on Windows? Do you use it through the proxy settings of the browser or some kind of TUN mode provided by v2rayN?

It looks like the latter because the reqAddr is an IPv6 address, not a domain, which might be because your PC resolved it locally before sending the request, something that usually only happens in TUN mode.

Kingphoenix666 commented 10 months ago

Can you explain exactly how you use it on Windows? Do you use it through the proxy settings of the browser or some kind of TUN mode provided by v2rayN?

It looks like the latter because the reqAddr is an IPv6 address, not a domain, which might be because your PC resolved it locally before sending the request, something that usually only happens in TUN mode.

I use "Proxy mode + Proxifre" in V2rayN and NekoRay for both HY2 connection and Reality that Reality work without problem but HY2 have problem in chrome.

Kingphoenix666 commented 10 months ago

My problem fix for HY2 connection with Proxifier by set to "DNS and IP Leak Prevention Mode" that i dont need set this option for other connection same as Reality.