Closed helmiau closed 2 years ago
@helmiau I haven't seen any changes. Now vmess can also use ws+tls, that is, wss.
maybe here websocket commit https://github.com/djoeni/websocket/commit/4bce2c551a0f5cc33ca1f506ad8d6dce0ecbc434 can give some clue?
Vmess configuration uses tls: true to use wss, now
trojan hasn't support it yet?
@helmiau The trojan transport only support tcp or grpc, in clash
okay thanks bro, thread closed then
@helmiau Sorry, I remember the wrong one. Trojan also has ws.
i already use trojan ws, but i haven't tried wss
@Skyxim i tried, but this config cannot be run
- name: api.midtrans.com
server: api.midtrans.com
port: 443
type: trojan
password: isi password atau uuid
skip-cert-verify: true
sni: api.midtrans.com
network: ws
ws-opts:
path: wss://api.midtrans.com/howdy
headers:
Host: isi server
udp: true
this patch below will add more websocket config path: wss://proxy.com/path
usage sample with this URL https://www.youtube.com/watch?v=3n4rdVS6B18
meta core patch come from https://github.com/djoeni/Clash.Meta/commit/9cd0ff7180090a56195487e04ad98158f33fba7e
websocket patch from https://github.com/djoeni/websocket/commit/4bce2c551a0f5cc33ca1f506ad8d6dce0ecbc434
can u merge this patch on this repo? thanks
@Skyxim i tried, but this config cannot be run
- name: api.midtrans.com server: api.midtrans.com port: 443 type: trojan password: isi password atau uuid skip-cert-verify: true sni: api.midtrans.com network: ws ws-opts: path: wss://api.midtrans.com/howdy headers: Host: isi server udp: true
this patch below will add more websocket config
path: wss://proxy.com/path
usage sample with this URL https://www.youtube.com/watch?v=3n4rdVS6B18 meta core patch come from djoeni@9cd0ff7 websocket patch from djoeni/websocket@4bce2c5 can u merge this patch on this repo? thanksEdit aja, langsung pr, manatau di merged
ya kalo itu anda saja, saya cuma ngasih usulan dan sumber aja. soalnya ga pake metode itu.
Looking at the patch. It require to patch gorilla/websocket
to allow a ws/wss scheme in path.
Currently meta will send a request like this
GET /ws://some.mask.host/websocket HTTP/1.1
With the patch:
GET ws://some.mask.host/websocket HTTP/1.1
Looking at the patch. It require to patch
gorilla/websocket
to allow a ws/wss scheme in path.Currently meta will send a request like this
GET /ws://some.mask.host/websocket HTTP/1.1
With the patch:
GET ws://some.mask.host/websocket HTTP/1.1
No, Websocket is never show the path with prefix wss/ws, wss/ws is equivalent to https/http, which is just a user description and used by a parser. As long as you use Websocket, that's ws..
This path is filled in by the user, in the configuration file.
Someone may write /http://xxxx
in the path of HTTP?
Looking at the patch. It require to patch
gorilla/websocket
to allow a ws/wss scheme in path. Currently meta will send a request like thisGET /ws://some.mask.host/websocket HTTP/1.1
With the patch:
GET ws://some.mask.host/websocket HTTP/1.1
No, Websocket is never show the path with prefix wss/ws, wss/ws is equivalent to https/http, which is just a user description and used by a parser. As long as you use Websocket, that's ws.. This path is filled in by the user, in the configuration file. Someone may write
http://xxxx
in the path of HTTP?
Yes, the standard ws protocol will use ws-host and ws-path correctly as above. But the one proposed by this issue was to trick the isp to reconnect to another node. Usually they will use tiktok or whatsapp server as a node.
server: v.whatsapp.net
sni: v.whatsapp.net
ws-opts:
path: ws://the.actual.server/ws
Or
server: real.host
sni: v.tiktokcdn.com
ws-opts:
path: wss://v.tiktokcdn.com/websocket
Yes, this is very special case and can only be used to certain isp with strict rules, sniffing around the sni and to censor or redirect the content. https://github.com/taamarin/Clash.Meta
Please add more websocket secure feature from this commit https://github.com/djoeni/Clash.Meta/commit/9cd0ff7180090a56195487e04ad98158f33fba7e
this commit will allow wss://web.com/
thank you