http transmition interoperability with xray links

This commit is contained in:
Alireza Ahmadi
2024-05-23 12:00:13 +02:00
parent e3be3be9d9
commit caa115bbe3
+3
View File
@@ -140,10 +140,12 @@ export namespace LinkUtil {
host: <string|null>'', host: <string|null>'',
path: <string|null>'', path: <string|null>'',
serviceName: <string|null>'', serviceName: <string|null>'',
type: <string|null>null,
} }
switch (t.type){ switch (t.type){
case TrspTypes.HTTP: case TrspTypes.HTTP:
const th = <HTTP>t const th = <HTTP>t
params.type = 'http'
params.host = th.host?.join(',')?? null params.host = th.host?.join(',')?? null
params.path = th.path?? null params.path = th.path?? null
break break
@@ -225,6 +227,7 @@ export namespace LinkUtil {
host: tParams.host, host: tParams.host,
id: u?.uuid, id: u?.uuid,
net: transport?.type?? 'tcp', net: transport?.type?? 'tcp',
type: transport?.type == 'http' ? 'http' : undefined,
path: tParams.path, path: tParams.path,
port: inbound.listen_port, port: inbound.listen_port,
ps: inbound.tag, ps: inbound.tag,