go-gost / gost

GO Simple Tunnel - a simple tunnel written in golang
https://gost.run
MIT License
4.3k stars 521 forks source link

tun over icmp6 not work(在组合使用tun与icmp6时候出现了麻烦) #562

Closed aa51513 closed 2 months ago

aa51513 commented 2 months ago

server config: 服务端配置:

services:
- name: service-0
  addr: :8421
  handler:
    type: tun
  listener:
    type: tun
    metadata:
      net: 10.90.57.30/24
- name: service-1
  addr: :0
  handler:
    type: auto
    metadata:
      bind: true
  listener:
    type: icmp6
    metadata:
      keepAlive: true

client config: 客户端配置:

services:
- name: tun
  addr: :0
  handler:
    type: tun
    chain: chain-0
    metadata:
      keepAlive: true
      ttl: 10s
  listener:
    type: tun
    metadata:
      net: 10.90.57.1/24
  forwarder:
    nodes:
    - name: target-0
      addr: 10.90.57.30:8421
chains:
- name: chain-0
  hops:
  - name: hop-0
    nodes:
    - name: node-0
      addr: ipv6.server.com:0
      connector:
        type: relay
      dialer:
        type: icmp6

error logs on client: 客户端错误日志:

{"dst":"10.90.57.30:8421/udp","handler":"tun","kind":"handler","level":"error","listener":"tun","local":":0","msg":"<nil>","remote":"10.90.57.1","service":"tun","time":"2024-08-23T02:42:46.588Z"}

what is wrong? 哪里出现了问题?

ginuerzh commented 2 months ago

auto类型的handler不支持relay,需要显示指定为relay。

aa51513 commented 2 months ago

auto类型的handler不支持relay,需要显示指定为relay。

After changing from auto to relay, it works 将auto换成relay后,就正常了

Thank you very much 非常感谢您的帮助