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

subscription parse problem #401

Open
SSgumS opened this issue Oct 19, 2024 · 3 comments
Open

subscription parse problem #401

SSgumS opened this issue Oct 19, 2024 · 3 comments

Comments

@SSgumS
Copy link

SSgumS commented Oct 19, 2024

the latest stable version ruined subscription url parsing. it ignores alpn values and only adds http/1.1. also it allows insecure by its own and if you set allowInsecure=0, it doesn't respect.

@GooRingX
Copy link
Contributor

Please provide a test subscription

@SSgumS
Copy link
Author

SSgumS commented Oct 24, 2024

For example, if you import bellow line into Karing:
trojan://[email protected]:443?mode=gun&security=tls&alpn=h2,http/1.1&authority=test.test&type=grpc&serviceName=test&sni=test.test#test

Karing parses it into:

{
  "server": "test.test",
  "server_port": 443,
  "tag": "test",
  "type": "trojan",
  "attach": "",
  "password": "test",
  "tls": {
    "enabled": true,
    "server_name": "test.test",
    "insecure": true,
    "alpn": [
      "http/1.1"
    ],
    "utls": {
      "enabled": true
    }
  },
  "transport": {
    "type": "grpc",
    "service_name": "test"
  }
}

The expected parsed value:

{
  "server": "test.test",
  "server_port": 443,
  "tag": "test",
  "type": "trojan",
  "password": "test",
  "tls": {
    "enabled": true,
    "server_name": "test.test",
    "insecure": false,
    "alpn": [
      "h2",
      "http/1.1"
    ]
  },
  "transport": {
    "type": "grpc",
    "service_name": "test"
  }
}

🔶 Wrong parts in Karing are: tls->insecure, tls->alpn, and tls->utls.

@GooRingX
Copy link
Contributor

GooRingX commented Oct 25, 2024

alpn: After adding h2, the kernel cannot connect. This is a bug and has not been fixed yet.
insecure: always true.
utls: Trojan conversion is enabled by default.

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