mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-06-29 16:00:00 +00:00
Improve config error text
This commit is contained in:
parent
68d8cd4043
commit
54b525d559
@ -129,7 +129,7 @@ func (c *clientConfig) Check() error {
|
|||||||
if len(c.SOCKS5.Listen) == 0 && len(c.HTTP.Listen) == 0 && len(c.TUN.Name) == 0 &&
|
if len(c.SOCKS5.Listen) == 0 && len(c.HTTP.Listen) == 0 && len(c.TUN.Name) == 0 &&
|
||||||
len(c.TCPRelay.Listen) == 0 && len(c.UDPRelay.Listen) == 0 &&
|
len(c.TCPRelay.Listen) == 0 && len(c.UDPRelay.Listen) == 0 &&
|
||||||
len(c.TCPTProxy.Listen) == 0 && len(c.UDPTProxy.Listen) == 0 {
|
len(c.TCPTProxy.Listen) == 0 && len(c.UDPTProxy.Listen) == 0 {
|
||||||
return errors.New("no SOCKS5, HTTP, relay or TProxy listen address")
|
return errors.New("please enable at least one mode")
|
||||||
}
|
}
|
||||||
if len(c.TCPRelay.Listen) > 0 && len(c.TCPRelay.Remote) == 0 {
|
if len(c.TCPRelay.Listen) > 0 && len(c.TCPRelay.Remote) == 0 {
|
||||||
return errors.New("no TCP relay remote address")
|
return errors.New("no TCP relay remote address")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user