Release 1.2.0 Windows amd64 with Hysteria 2

This commit is contained in:
Navis
2026-07-28 07:14:52 +03:00
parent 5d968dc0e3
commit 7eaf53f7c2
22 changed files with 801 additions and 75 deletions
+5 -2
View File
@@ -11,7 +11,8 @@ import (
type Protocol string
const (
ProtocolNaive Protocol = "naive"
ProtocolNaive Protocol = "naive"
ProtocolHysteria2 Protocol = "hysteria2"
)
// Config is the top-level client configuration.
@@ -161,8 +162,10 @@ func (c *Config) Validate() error {
return fmt.Errorf("config: profile[%d] missing name", i)
}
switch p.Protocol {
case ProtocolNaive:
case ProtocolNaive, ProtocolHysteria2:
// Proxy may be empty until the user pastes a share link in the UI.
case "":
c.Profiles[i].Protocol = ProtocolNaive
default:
return fmt.Errorf("config: profile %q: unsupported protocol %q", p.Name, p.Protocol)
}