Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

[Bug] 单独配置的[[fallback]]无法正确回落 #252

Open
HeXis-YS opened this issue Mar 1, 2023 · 1 comment
Open

[Bug] 单独配置的[[fallback]]无法正确回落 #252

HeXis-YS opened this issue Mar 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@HeXis-YS
Copy link

HeXis-YS commented Mar 1, 2023

Describe the bug【描述 bug】
当回落以[[fallback]]形式单独配置时,被verysimple忽略,导致无法正常回落。
当回落以fallback=形式在[[listen]]内配置时,可以正常回落。

To Reproduce【如何复现该bug】
按提供的配置文件运行verysimple,然后访问8443端口。

Expected behavior【预期的行为】
应该能够访问verysimple回落后的服务。

Envs (please complete the following information):【系统环境】
Clear Linux 38630, Kernel 6.2.1
verysimple 1088b27

Config file 【配置文件,客户端服务端配置都提供】

不能正常回落的配置
[app]
loglevel = 0
logfile = "/root/tmp/vs_log"

[[listen]]
tag = "vless-tcp-in"
protocol = "vlesss"
uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
ip = "0.0.0.0"
port = 8443
version = 0
sniffing.enabled = false
cert = "/usr/local/etc/xray/cert.pem"
key = "/usr/local/etc/xray/cert.key"
extra.tls_minVersion = "1.3"
alpn = ["h2"]

[[fallback]]
from = ["vless-tcp-in"]
dest = "/dev/shm/h2c.sock"
可以正常回落的配置
[app]
loglevel = 0
logfile = "/root/tmp/vs_log"

[[listen]]
tag = "vless-tcp-in"
protocol = "vlesss"
uuid = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
ip = "0.0.0.0"
port = 8443
version = 0
fallback = "/dev/shm/h2c.sock"
sniffing.enabled = false
cert = "/usr/local/etc/xray/cert.pem"
key = "/usr/local/etc/xray/cert.key"
extra.tls_minVersion = "1.3"
alpn = ["h2"]

Debug Log 【Debug日志, 客户端 和 服务端 的 日志 都提供】

异常回落日志
{"L":"INFO ","T":"230301 034029.828","M":"Program started","loglvl":0}
{"L":"INFO ","T":"230301 034029.830","M":"zap log init complete.","logfile":"/root/tmp/vs_log"}
{"L":"INFO ","T":"230301 034029.831","M":"verysimple v1.2.5-1088b279ef77e4c34405ead8913588aaa83f425e, go1.20.1 linux amd64, with advLayer packages: [grpcSimple ws] \n"}
{"L":"INFO ","T":"230301 034029.833","M":"Working at","dir":"/root/tmp/fallback"}
{"L":"DEBUG","T":"230301 034029.834","M":"All Given Flags","flags":{"c":"my string representation"}}
{"L":"INFO ","T":"230301 034029.836","M":"Options","Log Level":"debug","UseReadv":true}
{"L":"INFO ","T":"230301 034029.838","M":"Starting..."}
{"L":"INFO ","T":"230301 034029.840","M":"Listening","tag":"vless-tcp-in","protocol":"tls+vless","listen_addr":"0.0.0.0:8443","defaultClient":"dual+direct","dial_addr":""}
{"L":"INFO ","T":"230301 034035.304","M":"New Accepted Conn","connid":833076,"from":"1.2.3.4:54190","handler":"tls+vless://0.0.0.0:8443#vless-tcp-in"}
{"L":"WARN ","T":"230301 034035.555","M":"Failed handshakeInserver","connid":833076,"handler":"0.0.0.0:8443","client RemoteAddr":"1.2.3.4:54190","error":" [ Vless Invalid version  , Detail: invalid data, Data: 80 ] , with Buffer,len 148"}
{"L":"WARN ","T":"230301 034035.557","M":"Invalid request and no matched fallback, hung up","connid":833076,"client RemoteAddr":"1.2.3.4:54190"}
{"L":"INFO ","T":"230301 034038.905","M":"Program got close signal."}
{"L":"INFO ","T":"230301 034038.907","M":"Stopping..."}
正常回落日志
{"L":"INFO ","T":"230301 034111.605","M":"Program started","loglvl":0}
{"L":"INFO ","T":"230301 034111.607","M":"zap log init complete.","logfile":"/root/tmp/vs_log"}
{"L":"INFO ","T":"230301 034111.609","M":"verysimple v1.2.5-1088b279ef77e4c34405ead8913588aaa83f425e, go1.20.1 linux amd64, with advLayer packages: [grpcSimple ws] \n"}
{"L":"INFO ","T":"230301 034111.610","M":"Working at","dir":"/root/tmp/fallback"}
{"L":"DEBUG","T":"230301 034111.611","M":"All Given Flags","flags":{"c":"my string representation"}}
{"L":"INFO ","T":"230301 034111.613","M":"Options","Log Level":"debug","UseReadv":true}
{"L":"INFO ","T":"230301 034111.616","M":"Starting..."}
{"L":"INFO ","T":"230301 034111.618","M":"Listening","tag":"vless-tcp-in","protocol":"tls+vless","listen_addr":"0.0.0.0:8443","defaultClient":"dual+direct","dial_addr":""}
{"L":"INFO ","T":"230301 034114.790","M":"New Accepted Conn","connid":649965,"from":"1.2.3.4:54034","handler":"tls+vless://0.0.0.0:8443#vless-tcp-in"}
{"L":"WARN ","T":"230301 034115.080","M":"Failed handshakeInserver","connid":649965,"handler":"0.0.0.0:8443","client RemoteAddr":"1.2.3.4:54034","error":" [ Vless Invalid version  , Detail: invalid data, Data: 80 ] , with Buffer,len 148"}
{"L":"DEBUG","T":"230301 034115.082","M":"Fallback to default setting","addr":"/dev/shm/h2c.sock"}
{"L":"DEBUG","T":"230301 034115.084","M":"Default Route","connid":649965,"source":"/dev/shm/h2c.sock","client":"dual+direct","addr":""}
{"L":"INFO ","T":"230301 034115.086","M":"Request","connid":649965,"Fallback from":"1.2.3.4:54034","Target":"unix://%2Fdev%2Fshm%2Fh2c.sock","through":"dual+direct://"}
{"L":"DEBUG","T":"230301 034115.088","M":"handshake client with first payload","connid":649965,"len":148}
{"L":"DEBUG","T":"230301 034115.090","M":"TryCopy","id":649965,"from":"*net.UnixConn","->":"*tlsLayer.conn"}
{"L":"DEBUG","T":"230301 034115.092","M":"copying with readv","id":649965}
{"L":"DEBUG","T":"230301 034115.090","M":"TryCopy","id":649965,"from":"*tlsLayer.conn","->":"*net.UnixConn"}
{"L":"DEBUG","T":"230301 034115.095","M":"copying with classic method","id":649965}
{"L":"INFO ","T":"230301 034118.125","M":"Program got close signal."}
{"L":"INFO ","T":"230301 034118.126","M":"Stopping..."}

Other 【其他】

【注意,配置文件和客户端服务端配置 太长的话,前后加上三个 `, 如 ```】

@HeXis-YS HeXis-YS added the bug Something isn't working label Mar 1, 2023
@SakuraSakuraSakuraChan
Copy link

这流量不是h2吧,感觉没必要加alpn

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants