XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
24.19k stars 3.81k forks source link

httpupgradeSettings is required field, wsSettings is not #3244

Closed mmmray closed 5 months ago

mmmray commented 5 months ago

this is invalid config on latest release:

      "streamSettings": {
        "network": "httpupgrade"
      },

the error message is:

Failed to start: main: failed to create server > app/proxyman/outbound: failed to parse stream settings > transport/internet: unknown transport protocol: httpupgrade

that's surprising because this works:

      "streamSettings": {
        "network": "ws"
      },

in order to fix my httpupgrade config, i have to change it to:

      "streamSettings": {
        "network": "httpupgrade",
        "httpupgradeSettings": {}
      },

i traced this error message back to here: https://github.com/XTLS/Xray-core/blob/07ed0946b502fb00661925e60a449886ec14e95d/transport/internet/config.go#L64

and noticed that there is no ConfigCreator for httpupgrade, but there is one for websocket.

Fangliding commented 5 months ago

It should have been fixed. What is your xray version

mmmray commented 5 months ago

I tried with 1.8.10 (teddysun's docker image)

and manually building SHAs 07ed0946b502fb00661925e60a449886ec14e95d and now also tried 548646fb06489cc05559cfa47bd6455ac9b5ae87

mmmray commented 5 months ago

I found the fix you are referring to: https://github.com/XTLS/Xray-core/pull/3153

I don't know Go very well, but I think you fixed a different instance of the same error. You fixed the error coming from here:

https://github.com/XTLS/Xray-core/blob/548646fb06489cc05559cfa47bd6455ac9b5ae87/infra/conf/transport_internet.go#L651-L652

but I encounter the error here:

https://github.com/XTLS/Xray-core/blob/548646fb06489cc05559cfa47bd6455ac9b5ae87/transport/internet/config.go#L64

I know this because my error does not contain a Config: string.

Fangliding commented 5 months ago

@mmmray Very Leeuwenhoek. This happens in outbound. Mine fixed inbound I already open a pull request to fix it. Thank you.

mmmray commented 5 months ago

https://en.wiktionary.org/wiki/%E5%88%97%E6%96%87%E8%99%8E%E5%85%8B

(neologism, slang) incredibly observant person able to perceive fine details; person with a keen eye

interesting. thanks!

yuhan6665 commented 5 months ago

hmm I just noticed @mmmray is the poster started this one https://github.com/net4people/bbs/issues/281 Thanks for continuous contribution to the community from both of you!