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

v3 shadownsocks 客户端,如何配置 obfs ? #627

Open
orwithout opened this issue Dec 18, 2024 · 4 comments
Open

v3 shadownsocks 客户端,如何配置 obfs ? #627

orwithout opened this issue Dec 18, 2024 · 4 comments

Comments

@orwithout
Copy link

orwithout commented Dec 18, 2024

我有一个shadowsocks 服务器节点,在sing-box 的正确配置是这样:

    {
        "type": "shadowsocks",
        "tag": "韩国 01",
        "server": "myproxy.com",
        "server_port": 12340,
        "method": "aes-128-gcm",
        "password": "Vvvvvxxxxxx",
        "tcp_fast_open": false,
        "plugin": "obfs-local",
        "plugin_opts": "obfs=tls;obfs-host=alibaba.com"
    }

我只查找到 gost v3 上相关配置的这个文档,内容很少(此文档是配置server节点,而我应该是需要在chains 中配置):https://v3.gost.run/reference/listeners/otls/ ,它没有说明如何对应设置 obfs-host 字段?

另外,我查询到 gost v2 似乎是支持obfs 配置的:https://v2.gost.run/simple-obfs/

所以我想求助:
对于上面使用sing-box 配置展示的、带有obfs tls 选项的 shadowsocks 服务器节点,我如何配置gost v3 来与之连接?

@ginuerzh
Copy link
Member

V3中的使用方式与V2中相同,可以试试:

gost -L=:8080 -F=ss+otls://aes-128-gcm:123456@server_ip:12340?host=alibaba.com

@orwithout
Copy link
Author

orwithout commented Dec 21, 2024

设置了 host ,测试不行:
image
image

chains:
- name: chain-0
  hops:
  - name: hop-0
    nodes:
    - name: node-0
      addr: myproxy.com:12340
      connector:
        type: ss
        auth:
          username: aes-128-gcm
          password: "Vvvvvxxxxxx"
      dialer:
        #type: tcp
        type: otls
        host: alibaba.com

image
而一旦我将 dialer type 改为 tcp 并设置正确的无obfs选项的 shadowsocks 对端,则可以正确代理。

@ginuerzh
Copy link
Member

host设置错误,要放在metadata中

      dialer:
        type: otls
        metadata:
          host: alibaba.com

@orwithout
Copy link
Author

仍然没有调通。但也不能100%确定就是gost 的问题,比如可能是我的shadowsocks服务供应商能阻断https代理?

对于otls 配置的shadowsocks,浏览器报错:
image
(图片中“详细了解”连接:https://support.mozilla.org/1/firefox/132.0.1/WINNT/zh-CN/connection-not-secure

后台日志:
image

我的配置:

log:
  level: error

services:
- name: service-0
  addr: :57000
  # hosts: hosts-0
  # resolver: resolver-0
  handler:
    type: http
    auther: auther-0
    chain: chain-1
    # metadata:
    #   udp: true
    #   udpBufferSize: 4096
  
  listener:
    type: tls

  # admissions:   # 设置过滤规则
  # - admission-0


tls:
  certFile: /etc/gost/cert.cer
  keyFile: /etc/gost/private.key
  # caFile: /etc/gost//ca.cer
authers:
- name: auther-0
  auths:
  - username: user1
    password: pass1
  - username: user2
    password: pass2


hosts:
- name: hosts-0
  mappings:
  - ip: 127.0.0.1
    hostname: localhost
  - ip: 192.168.1.2
    hostname: server.local
resolvers:
- name: resolver-0
  nameservers:
  - addr: udp://192.168.1.1:53


chains:
- name: chain-0
  hops:
  - name: hop-0
    nodes:
    - name: node-0
      addr: addr1.com:12340
      connector:
        type: ss
        auth:
          username: chacha20-ietf
          password: "pass1"
      dialer:
        type: tcp

- name: chain-1
  hops:
  - name: hop-0
    nodes:
    - name: node-0
      addr: addr2.com:12341
      connector:
        type: ss
        auth:
          username: aes-128-gcm
          password: "pass2"
      dialer:
        # type: tcp
        type: otls
        metadata:
          # obfs: http
          # obfs: tls
          host: hostx.taobao.com



admissions:
- name: admission-0
  whitelist: true
  matchers:
  - 127.0.0.1
  - 192.168.1.31
  - 172.16.0.0/12
  - 10.0.0.0/8

*对于metadata尝试过添加 obfs: http 、 obfs: tls,报错情况也都是一样(此节点sing-box的正确配置是obfs=http;)。

我只需修改为 server-0.chain: chain-0,则可以正确代理。

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

2 participants