Add hysteria2 realm service and support

This commit is contained in:
世界
2026-05-10 13:31:53 +08:00
parent 89d83aa6d2
commit 094808a4fa
20 changed files with 1167 additions and 33 deletions
+24 -2
View File
@@ -22,6 +22,15 @@ type Hysteria2InboundOptions struct {
Masquerade *Hysteria2Masquerade `json:"masquerade,omitempty"`
BBRProfile string `json:"bbr_profile,omitempty"`
BrutalDebug bool `json:"brutal_debug,omitempty"`
Realm *Hysteria2Realm `json:"realm,omitempty"`
}
type Hysteria2Realm struct {
ServerURL string `json:"server_url"`
Token string `json:"token,omitempty"`
RealmID string `json:"realm_id"`
STUNServers badoption.Listable[string] `json:"stun_servers"`
HTTPClient *HTTPClientOptions `json:"http_client,omitempty"`
}
type Hysteria2Obfs struct {
@@ -124,6 +133,19 @@ type Hysteria2OutboundOptions struct {
Network NetworkList `json:"network,omitempty"`
OutboundTLSOptionsContainer
QUICOptions
BBRProfile string `json:"bbr_profile,omitempty"`
BrutalDebug bool `json:"brutal_debug,omitempty"`
BBRProfile string `json:"bbr_profile,omitempty"`
BrutalDebug bool `json:"brutal_debug,omitempty"`
Realm *Hysteria2Realm `json:"realm,omitempty"`
}
type HysteriaRealmUser struct {
Name string `json:"name"`
Token string `json:"token"`
MaxRealms int `json:"max_realms,omitempty"`
}
type HysteriaRealmServiceOptions struct {
ListenOptions
InboundTLSOptionsContainer
Users []HysteriaRealmUser `json:"users"`
}