Add hysteria2 realm service and support

This commit is contained in:
世界
2026-08-30 17:41:40 +08:00
parent ae0c62aae8
commit 6da670ac45
18 changed files with 1164 additions and 30 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"`
}