shadowsocks-libev icon indicating copy to clipboard operation
shadowsocks-libev copied to clipboard

如何在IPv4环境下通过shadowsocks访问IPv6

Open Sherlock-Holo opened this issue 10 years ago • 13 comments

已设置监听IPv4和IPv6了,我在IPv4环境下无法通过shadowsocks访问IPv6.google.com,请问如何在IPv4下用shadowsocks访问IPv6的网站

Sherlock-Holo avatar Jan 16 '16 13:01 Sherlock-Holo

Just visit it. Of course, make sure your server has IPv6 connection.

madeye avatar Jan 16 '16 14:01 madeye

我可以在服务器ping6到IPv6.goigle.com,但就是无法在本地访问他?

Sherlock-Holo avatar Jan 16 '16 14:01 Sherlock-Holo

just the same problem and still not find a way to solve it.

xulei890817 avatar Dec 01 '16 08:12 xulei890817

Turn on ipv6 route.

Mygod avatar Dec 01 '16 08:12 Mygod

@Sherlock-Holo 朋友你搞定了么? 想在 openwrt 上 redirect IPV6 到 ss-redir 端口, 但是尝试了ip6tables -t nat -A OUTPUT -p tcp -j REDIRECT --to-port 1010没有成功, 可以给点建议吗?

@Mygod I can visit ipv6.google.com by shadowsocks-android. Is there any advice for me to redirect ipv6 traffic to ss-redir's port on openwrt? I have tried ip6tables -t nat -A OUTPUT -p tcp -j REDIRECT --to-port 1010, but ss-redir didn't receive any data when I visit ipv6.google.com by curl or wget on openwrt

lanx-x avatar Sep 10 '17 08:09 lanx-x

@icymind I have done this in LEDE 17.01.1.

  1. ss-redir -b 0.0.0.0 -b ::, make sure ss-redir listening on ipv6
  2. ip6tables -t nat -A PREROUTING -p tcp -j REDIRECT --to-ports 1234, redirect tcp traffic to the corresponding port

pengchongfu avatar Mar 04 '18 17:03 pengchongfu

有人解决了吗? the same problem

Thomas-cat avatar Jun 29 '18 09:06 Thomas-cat

see this: http://fpcsongazure.top/how-to-fuck-gfw-to-get-a-paper/

in python version you can change hosts to do this but in libev version of ss you need to make a dns yourself.

I use centos7

yum -y install unbound
systemctl restart unbound
systemctl enable unbound
vi /etc/unbound/local.d/google-scholar.conf

add this (you can use ping6 www.google.com to get google ip of your own)

local-data: "scholar.google.com AAAA 2607:f8b0:4004:801::2004"

unbound-checkconf systemctl restart unbound

at last use your own dns

vi /etc/shadowsocks-libev/config.json
"nameserver":"127.0.0.1"

then restart shadowsocks

systemctl restart shadowsocks-libev

wswind avatar Jul 20 '18 05:07 wswind

@wswind You can change /etc/hosts as well for shadowsocks-libev. Make sure you've upgraded to the latest version.

madeye avatar Jul 20 '18 06:07 madeye

@madeye thanks for reply

I'm using librehat 's repository ,this is the info:

Name : shadowsocks-libev Arch : x86_64 Version : 3.2.0 Release : 1.el7

Changing hosts doesn't work in this version . I'm not sure if it is the latest version,or something went wrong with my configuration

my config.json is

{
    "server":["[::0]", "0.0.0.0"],
    "server_port":...,
    "local_port":1080,
    "password":"...",
    "timeout":60,
    "method":"aes-256-gcm"
}

my firewalld is

            firewall-cmd --permanent --zone=public --add-port=.../tcp
            firewall-cmd --permanent --zone=public --add-port=.../udp
            firewall-cmd --reload

scholar.google.com blocks me (ipv4 address of my server) if I don't configure my own dns

wswind avatar Jul 20 '18 13:07 wswind

Add this line in you config.json. "ipv6_first":true and server should be config like this "server":["::0","0.0.0.0"]

whour avatar Jul 23 '18 01:07 whour

@whour thanks,it works. hosts works when "ipv6_first" is configured

wswind avatar Jul 23 '18 02:07 wswind

but, latest 3.3.5 version is not work. 3.0.0 is work fine. @madeye , how fix it.

ss-redir 3..3.5

ifconfig.co — What is my IP address?
202.182.*.*

ss-redir 3.0.0

ifconfig.co — What is my IP address?
2001:19f0:7001:323e:5400:3ff:*.*

0neday avatar Feb 14 '21 12:02 0neday