mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-18 09:02:45 +03:00
Integrate AmneziaWG
This commit is contained in:
@@ -16,6 +16,7 @@ type WireGuardEndpointOptions struct {
|
||||
Peers []WireGuardPeer `json:"peers,omitempty"`
|
||||
UDPTimeout badoption.Duration `json:"udp_timeout,omitempty"`
|
||||
Workers int `json:"workers,omitempty"`
|
||||
Amnezia *WireGuardAmnezia `json:"amnezia,omitempty"`
|
||||
DialerOptions
|
||||
}
|
||||
|
||||
@@ -38,12 +39,13 @@ type LegacyWireGuardOutboundOptions struct {
|
||||
PrivateKey string `json:"private_key"`
|
||||
Peers []LegacyWireGuardPeer `json:"peers,omitempty"`
|
||||
ServerOptions
|
||||
PeerPublicKey string `json:"peer_public_key"`
|
||||
PreSharedKey string `json:"pre_shared_key,omitempty"`
|
||||
Reserved []uint8 `json:"reserved,omitempty"`
|
||||
Workers int `json:"workers,omitempty"`
|
||||
MTU uint32 `json:"mtu,omitempty"`
|
||||
Network NetworkList `json:"network,omitempty"`
|
||||
PeerPublicKey string `json:"peer_public_key"`
|
||||
PreSharedKey string `json:"pre_shared_key,omitempty"`
|
||||
Reserved []uint8 `json:"reserved,omitempty"`
|
||||
Workers int `json:"workers,omitempty"`
|
||||
MTU uint32 `json:"mtu,omitempty"`
|
||||
Network NetworkList `json:"network,omitempty"`
|
||||
Amnezia *WireGuardAmnezia `json:"amnezia,omitempty"`
|
||||
}
|
||||
|
||||
type LegacyWireGuardPeer struct {
|
||||
@@ -53,3 +55,15 @@ type LegacyWireGuardPeer struct {
|
||||
AllowedIPs badoption.Listable[netip.Prefix] `json:"allowed_ips,omitempty"`
|
||||
Reserved []uint8 `json:"reserved,omitempty"`
|
||||
}
|
||||
|
||||
type WireGuardAmnezia struct {
|
||||
JC int `json:"jc,omitempty"`
|
||||
JMin int `json:"jmin,omitempty"`
|
||||
JMax int `json:"jmax,omitempty"`
|
||||
S1 int `json:"s1,omitempty"`
|
||||
S2 int `json:"s2,omitempty"`
|
||||
H1 uint32 `json:"h1,omitempty"`
|
||||
H2 uint32 `json:"h2,omitempty"`
|
||||
H3 uint32 `json:"h3,omitempty"`
|
||||
H4 uint32 `json:"h4,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user