Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在同一个虚拟子接口同时监听 IPv4/IPv6 进行端口转发的一些疑问。 #571

Open
Zerorigin opened this issue Sep 9, 2024 · 1 comment

Comments

@Zerorigin
Copy link

我想将 GoSTv3 部署到网关路由器上,网关上有一个虚拟接口 lan 绑定了很多物理设备 ethX,在这个虚拟接口 lan 下通过 vlan 划分了多个虚拟子接口,这些虚拟子接口都有属于自己的一个内网 IPv4 网段和动态的公网 IPv6 子网。
而配置在虚拟子接口的 IPv4 网关是固定的,公网 IPv6 网关是动态的(会定期根据营运商分发的前缀进行自动更新)。

我想通过指定虚拟子接口的形式(通过接口名称或接口对应的固定 IPv4 网关地址),来绑定到指定的私网 IPv4 和 IPv6 网关,我的配置如下,但是我发现 GoST 似乎是在父级虚拟接口 lan 下的所有虚拟子接口的所有 IPv4 和 IPv6 地址(包含不在此虚拟子接口的所有弟子)都进行了监听。

似乎 metadata.interface 的含义和我想的有点不一样,我想了解下有什么配置可以实现我想要的效果么?

services:
    - name: service-0
      addr: :12345
      handler:
          type: tcp
          chain: chain-0
      listener:
          type: tcp
      metadata:
          interface: "192.168.56.1!"    # or virt_sub_interface_name

chains:
    - name: chain-0
      hops:
          - name: hop-0
            nodes:
                - name: node-0
                  addr: 1.2.3.4:12345
                  connector:
                      type: relay
                      auth:
                          username: username
                          password: password
                      metadata:
                          nodelay: false
                  dialer:
                      type: tls
                      metadata:
                          nodelay: false

log:
    output: stderr
    level: warn
@Zerorigin
Copy link
Author

Zerorigin commented Oct 20, 2024

后续会支持仅绑定特定进站接口这个特性么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant