mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-14 00:51:12 +03:00
Update Amnezia H1-H4 format
This commit is contained in:
@@ -202,17 +202,17 @@ func (e *Endpoint) Start(resolve bool) error {
|
||||
if e.options.Amnezia.S4 > 0 {
|
||||
ipcConf += "\ns4=" + strconv.Itoa(e.options.Amnezia.S4)
|
||||
}
|
||||
if e.options.Amnezia.H1 > 0 {
|
||||
ipcConf += "\nh1=" + strconv.FormatUint(uint64(e.options.Amnezia.H1), 10)
|
||||
if e.options.Amnezia.H1 != nil {
|
||||
ipcConf += "\nh1=" + e.options.Amnezia.H1.String()
|
||||
}
|
||||
if e.options.Amnezia.H2 > 0 {
|
||||
ipcConf += "\nh2=" + strconv.FormatUint(uint64(e.options.Amnezia.H2), 10)
|
||||
if e.options.Amnezia.H2 != nil {
|
||||
ipcConf += "\nh2=" + e.options.Amnezia.H2.String()
|
||||
}
|
||||
if e.options.Amnezia.H3 > 0 {
|
||||
ipcConf += "\nh3=" + strconv.FormatUint(uint64(e.options.Amnezia.H3), 10)
|
||||
if e.options.Amnezia.H3 != nil {
|
||||
ipcConf += "\nh3=" + e.options.Amnezia.H3.String()
|
||||
}
|
||||
if e.options.Amnezia.H4 > 0 {
|
||||
ipcConf += "\nh4=" + strconv.FormatUint(uint64(e.options.Amnezia.H4), 10)
|
||||
if e.options.Amnezia.H4 != nil {
|
||||
ipcConf += "\nh4=" + e.options.Amnezia.H4.String()
|
||||
}
|
||||
if e.options.Amnezia.I1 != "" {
|
||||
ipcConf += "\ni1=" + e.options.Amnezia.I1
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
Xbadoption "github.com/sagernet/sing-box/common/xray/json/badoption"
|
||||
tun "github.com/sagernet/sing-tun"
|
||||
"github.com/sagernet/sing/common/logger"
|
||||
M "github.com/sagernet/sing/common/metadata"
|
||||
@@ -49,10 +50,10 @@ type AmneziaOptions struct {
|
||||
S2 int
|
||||
S3 int
|
||||
S4 int
|
||||
H1 uint32
|
||||
H2 uint32
|
||||
H3 uint32
|
||||
H4 uint32
|
||||
H1 *Xbadoption.Range
|
||||
H2 *Xbadoption.Range
|
||||
H3 *Xbadoption.Range
|
||||
H4 *Xbadoption.Range
|
||||
I1 string
|
||||
I2 string
|
||||
I3 string
|
||||
|
||||
Reference in New Issue
Block a user