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

[Bug] 当且仅当同时启用tunnel和dialer-proxy的时候,任意节点(无论是自建的还是机场的)的dialer-proxy才能生效 #1696

Closed
8 of 9 tasks
SavooyT opened this issue Dec 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SavooyT
Copy link

SavooyT commented Dec 4, 2024

Verify steps

  • I have read the documentation and understand the meaning of all the configuration items I have written, rather than just piling up seemingly useful options or default values.
  • I have carefully reviewed the documentation and have not resolved the issue.
  • I have searched the Issue Tracker for the issue I want to raise and did not find it.
  • I am a non-Chinese user.
  • I have tested with the latest Alpha branch version, and the issue still persists.
  • I have provided the server and client configuration files and processes that can reproduce the issue locally, rather than a sanitized complex client configuration file.
  • I provided the simplest configuration that can be used to reproduce the errors in my report, rather than relying on remote servers or piling on a lot of unnecessary configurations for reproduction.
  • I have provided complete logs, rather than just the parts I think are useful out of confidence in my own intelligence.
  • I have directly reproduced the error using the Mihomo command-line program, rather than using other tools or scripts.

Operating System

Windows

System Version

Win11 22635.4515

Mihomo Version

image

Configuration File

mode: rule
log-level: info
allow-lan: true
tcp-concurrent: true
profile:
  store-selected: true
  store-fake-ip: true
find-process-mode: strict
external-controller: :9090

dns:
  enabled: true
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter:
    - '*.lan'
  prefer-h3: true 
  respect-rules: true
  proxy-server-nameserver:
    - https://223.5.5.5/dns-query
    - https://223.6.6.6/dns-query 
  direct-nameserver:
    - https://223.5.5.5/dns-query
    - https://223.6.6.6/dns-query  
  direct-nameserver-follow-policy: true

proxies:
  - {name: 🇸🇬 Singapore WAP, server: xx.xx.xx.xx, port: 12334, type: ss, cipher: aes-128-gcm, password: xxxx, tfo: true, udp: true, dialer-proxy: 🇸🇬(SSRDOG)Singapore}
  - {name: 🇸🇬 SG WAP(tunnel), server: 127.0.0.1, port: 7801, type: ss, cipher: aes-128-gcm, password: xxxx, tfo: true, udp: true}
  
tunnels:
- network: [tcp, udp]
  address: 127.0.0.1:7801
  target: xx.xx.xx.xx:12334
  proxy: 🇸🇬(SSRDOG)Singapore

# 代理组自动测速选择通用配置
URLTEST: &URLTEST
  type: url-test
  url: 'http://www.apple.com/library/test/success.html'
  interval: 300
# 代理组
proxy-groups:
  # 香港
  - name: 🇭🇰(SSRDOG)Hong Kong
    <<: *URLTEST
    use:
      - SSRDOG_HK
    tolerance: 3
  # 新加坡
  - name: 🇸🇬(SSRDOG)Singapore
    <<: *URLTEST
    use: 
      - SSRDOG_SG
    tolerance: 4
  # 日本
  - name: 🇯🇵(SSRDOG)Japan
    <<: *URLTEST
    use:
      - SSRDOG_JP
    tolerance: 6
  - name: 🇯🇵(JMS)Japan
    type: select
    use:
      - JMS_JP
  # 美国
  - name: 🇺🇸(SSRDOG)United States
    <<: *URLTEST
    tolerance: 10
    use:
      - SSRDOG_US
  - name: 🇺🇸(JMS)United States
    <<: *URLTEST
    tolerance: 10
    use:
      - JMS_US
  # 台湾
  - name: 🇹🇼(SSRDOG)Taiwan
    <<: *URLTEST
    use:
      - SSRDOG_TW
  # 荷兰
  - name: 🇳🇱(JMS)Netherlands
    type: select
    use:
      - JMS_NL  
  - name: 🇳🇱(SSRDOG)Netherlands
    type: select
    use:
      - SSRDOG_NL 
  # 其它地区
  - name: 🇬🇧(SSRDOG)United Kingdom
    type: select
    use:
      - SSRDOG_UK
  - name: 🇩🇪(SSRDOG)Germany
    type: select
    use:
      - SSRDOG_DE
  - name: 🇫🇷(SSRDOG)France
    type: select
    use:
      - SSRDOG_FR  
  - name: 🇹🇷(SSRDOG)Türkiye
    type: select
    use:
      - SSRDOG_TR   
  - name: 🇮🇳(SSRDOG)India
    type: select
    use:
      - SSRDOG_IN
  - name: 🇰🇷(SSRDOG)South Korea
    type: select
    use:
      - SSRDOG_KR

# 第一个机场(引用模式)
SSRDOG: &SSRDOG
  ...
# 第二个机场(引用模式)
JMS: &JMS
  ...
# 机场配置合集
proxy-providers:
  # 香港
  SSRDOG_HK: 
    <<: *SSRDOG 
    filter: 🇭🇰 Hong Kong
  # 新加坡
  SSRDOG_SG: 
    <<: *SSRDOG 
    filter: 🇸🇬 Singapore
  # 日本
  SSRDOG_JP: 
    <<: *SSRDOG 
    filter: 🇯🇵 Japan
  # 美国
  SSRDOG_US: 
    <<: *SSRDOG 
    filter: 🇺🇸 United States   
  # 台湾 🇹🇼
  SSRDOG_TW: 
    <<: *SSRDOG 
    filter: Taiwan
  # 其它地区
  SSRDOG_UK: 
    <<: *SSRDOG 
    filter: Britain
  SSRDOG_DE: 
    <<: *SSRDOG 
    filter: Germany   
  SSRDOG_FR: 
    <<: *SSRDOG 
    filter: France 
  SSRDOG_NL: 
    <<: *SSRDOG 
    filter: Netherlands 
  SSRDOG_TR: 
    <<: *SSRDOG 
    filter: Turkey
  SSRDOG_IN: 
    <<: *SSRDOG 
    filter: India
  SSRDOG_KR: 
    <<: *SSRDOG 
    filter: Korea 
#-----机场分割线-----#
  JMS_US:
    <<: *JMS 
    filter: s1|s2|s3
    override:
      tfo: true
      dialer-proxy: 🇺🇸(SSRDOG)United States                 
  JMS_JP:
    <<: *JMS 
    filter: s4
    override:
      tfo: true
      dialer-proxy: 🇭🇰(SSRDOG)Hong Kong           
  JMS_NL:
    <<: *JMS 
    filter: s5
    override:
      tfo: true
      dialer-proxy: 🇳🇱(SSRDOG)Netherlands

# 一些规则集的默认配置(引用模式)
RULE_DEFAULT: &R_D  
  type: http
  interval: 3600
  behavior: classical
# 规则集
rule-providers:  
  Gemini:
    <<: *R_D
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Gemini/Gemini_No_Resolve.yaml"
  OpenAI:
    <<: *R_D
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/OpenAI/OpenAI_No_Resolve.yaml"
  Claude:
    <<: *R_D
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Claude/Claude_No_Resolve.yaml"

rules:
  # 其他规则
  - DOMAIN-SUFFIX,tw,🇹🇼(SSRDOG)Taiwan
  - DOMAIN-KEYWORD,tecent,🇭🇰(SSRDOG)Hong Kong
  - DOMAIN-SUFFIX,tencent-cloud.cn,🇭🇰(SSRDOG)Hong Kong
  # OpenAI 强制走SG节点
  - RULE-SET,OpenAI,🇸🇬(SSRDOG)Singapore
  # Gemini 强制走SG节点
  - RULE-SET,Gemini,🇸🇬(SSRDOG)Singapore
  # Claude 强制走SG节点
  - RULE-SET,Claude,🇸🇬(SSRDOG)Singapore
  # 兜底规则
  - MATCH,🇭🇰(SSRDOG)Hong Kong
  
experimental:
  quic-go-disable-gso: false
  quic-go-disable-ecn: false

Description

在上述提到的配置文件中,在 proxies 和 tunnel 部分,如果仅启用proxies配置,且只在其中开启dialer-proxy:

proxies:

  • {name: 🇸🇬 Singapore WAP, server: xx.xx.xx.xx, port: 12334, type: ss, cipher: aes-128-gcm, password: xxxx, tfo: true, udp: true, dialer-proxy: 🇸🇬(SSRDOG)Singapore}

则会出现:
image


只有同时启用 proxies 和 tunnel配置,才可以成功拉取配置:

proxies:

  • {name: 🇸🇬 Singapore WAP, server: xx.xx.xx.xx, port: 12334, type: ss, cipher: aes-128-gcm, password: xxxx, tfo: true, udp: true, dialer-proxy: 🇸🇬(SSRDOG)Singapore}
  • {name: 🇸🇬 SG WAP(tunnel), server: 127.0.0.1, port: 7801, type: ss, cipher: aes-128-gcm, password: xxxx, tfo: true, udp: true}

tunnels:

  • network: [tcp, udp]
    address: 127.0.0.1:7801
    target: xx.xx.xx.xx:12334
    proxy: 🇸🇬(SSRDOG)Singapore

image

此时我的 🇸🇬 Singapore WAP 和 🇸🇬 SG WAP(tunnel)才能同时正常连接。


此外,如果我同时把 proxies 和 tunnel 配置全部删去,也无法拉取配置文件(报错同图二),也即:

JMS_US:
<<: *JMS
filter: s1|s2|s3
override:
tfo: true
dialer-proxy: 🇺🇸(SSRDOG)United States

此处的 dialer-proxy 配置也会失效。(其余的 JMS_JP、JMS_NL 同理)


综上所述,在我的问题中,如果想成功启用任意节点的 dialer-proxy(无论是机场的节点还是自建的节点),必须至少再设置一个 tunnel 配置才可以生效。

Reproduction Steps

出现这种问题的环境:

  1. 无论是否打开ipv6,都不影响这个问题的出现;
  2. 无论是否是自建节点,只要没有配置任意一个 tunnel,所有的 dialer-proxy 都会失效。

Logs

没有日志,因为当只有dialer-proxy的时候无法拉取配置文件
@SavooyT SavooyT added the bug Something isn't working label Dec 4, 2024
@SavooyT
Copy link
Author

SavooyT commented Dec 6, 2024

已排查清楚,是我这边自己的问题。

@SavooyT SavooyT closed this as completed Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant