xmdhs / clash2sfa

将 Clash.Meta 格式的订阅链接转换为 sing-box 格式的订阅,用于 SFA
https://clash2sfa.xmdhs.com
MIT License
468 stars 86 forks source link

支持 mux 的配置 #36

Closed love4taylor closed 7 months ago

love4taylor commented 7 months ago
smux:
  enabled: true
  protocol: smux

并没有被转换成

"multiplex": {
  "enabled": true,
  "protocol": "smux"
}

https://wiki.metacubex.one/config/proxies/sing-mux/

xmdhs commented 7 months ago

能给个完整的配置吗,我这里是可以正常转换的

love4taylor commented 7 months ago

input:

proxies:
- name: "demo"
  type: vless
  server: demo
  port: demo
  uuid: demo
  network: tcp
  tls: true
  udp: true
  flow: xtls-rprx-vision
  servername: demo
  reality-opts:
    public-key: demo
    short-id: demo
  client-fingerprint: chrome
  smux:
    enable: true

- name: "demo"
  type: ss
  server: demo
  port: demo
  cipher: 2022-blake3-aes-256-gcm
  password: "demo"
  ip-version: ipv6-prefer
  udp: true
  tfo: false
  mptcp: true
  smux:
    enable: true

output:

    "outbounds": [
        {
            "server": "demo",
            "server_port": demo,
            "tag": "demo",
            "tls": {
                "enabled": true,
                "server_name": "demo",
                "utls": {
                    "enabled": true,
                    "fingerprint": "chrome"
                },
                "reality": {
                    "enabled": true,
                    "public_key": "demo",
                    "short_id": "demo"
                }
            },
            "type": "vless",
            "uuid": "demo",
            "flow": "xtls-rprx-vision",
            "packet_encoding": "xudp"
        },
        {
            "password": "demo",
            "server": "demo",
            "server_port": demo,
            "tag": "demo",
            "type": "shadowsocks",
            "method": "2022-blake3-aes-256-gcm"
        },
        {
            "tag": "direct",
            "type": "direct"
        },
xmdhs commented 7 months ago
proxies:
  - name: "demo"
    type: vless
    server: demo
    port: demo
    uuid: demo
    network: tcp
    tls: true
    udp: true
    flow: xtls-rprx-vision
    servername: demo
    reality-opts:
      public-key: demo
      short-id: demo
    client-fingerprint: chrome
    smux:
-      enable: true
+      enabled: true
  - name: "demo"
    type: ss
    server: demo
    port: demo
    cipher: 2022-blake3-aes-256-gcm
    password: "demo"
    ip-version: ipv6-prefer
    udp: true
    tfo: false
    mptcp: true
    smux:
-      enable: true
+      enabled: true