(转)Locvps 解决无法访问ChatGPT/Gemini (适用其他hk机子)

/ 邓工 / 56阅读 / 0评论 / 分类: 分享

前言

刚刚买了Locvps的机子, 发现网络无法解锁ai, 折腾了一下, 走通了一条路(通过免费的ipv6隧道), 抛砖引玉分享一下

方法如下(Debian)

  1. 注册账号https://www.tunnelbroker.net/
  2. 左侧 Create Regular Tunnel , 关联自己服务器的ip, 选新加坡节点
  3. 创建完成之后点 Example Configurations 选择 Debian/Ubuntu
  4. 得到配置文件, 格式如下所示, 在 /etc/network/interfaces 中,将得到的配置文件填入
auto he-ipv6
iface he-ipv6 inet6 v4tunnel
  address 2001:123:123:123::2
  netmask 64
  endpoint 216.218.221.42
  local 自己ip
  ttl 255
  gateway 2001:123:123:123::1
  1. 在 /etc/sysctl.conf 中填写以下内容,填写完成后执行 sysctl -p 使之生效。
net.ipv6.conf.all.disable_ipv6 = 0    
net.ipv6.conf.default.disable_ipv6 = 0    
net.ipv6.conf.lo.disable_ipv6 = 0
  1. 在 /etc/resolv.conf 填写以下内容用以解析 Ipv6:
nameserver 2001:4860:4860::8888
  1. reboot 后 ip a ,即可看到多了一个隧道, ping google.com可以看到是通过ipv6访问
root@sanqiz:~# ping google.com
PING google.com(hkg12s32-in-x0e.1e100.net (2404:6800:4005:820::200e)) 56 data bytes
64 bytes from hkg12s32-in-x0e.1e100.net (2404:6800:4005:820::200e): icmp_seq=1 ttl=118 time=69.6 ms
64 bytes from hkg12s32-in-x0e.1e100.net (2404:6800:4005:820::200e): icmp_seq=2 ttl=118 time=71.2 ms
64 bytes from hkg12s32-in-x0e.1e100.net (2404:6800:4005:820::200e): icmp_seq=3 ttl=118 time=72.0 ms

  1. 在代理软件上设置outbound ,走ipv6地址(不同的代理软件设置方法不一样, 请自行搜索),这里只分享hy2的配置
outbounds:
  - name: direct
    type: direct
    direct:
      mode: 64 
      bindIPv4: 本机ipv4
      bindIPv6: 本机ipv6

扫描二维码,在手机上阅读
发表评论