Skip to content

Commit 5c3b201

Browse files
committed
add i5 to awg
1 parent c6f13a1 commit 5c3b201

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

ray2sing/awg.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import (
1616
func AWGSingboxTxt(content string) (*T.Endpoint, error) {
1717

1818
var (
19-
privateKey string
20-
addresses []netip.Prefix
21-
jc, jmin, jmax int
22-
s1, s2, s3, s4 int
23-
h1, h2, h3, h4, i1, i2, i3, i4 string
19+
privateKey string
20+
addresses []netip.Prefix
21+
jc, jmin, jmax int
22+
s1, s2, s3, s4 int
23+
h1, h2, h3, h4, i1, i2, i3, i4, i5 string
2424

2525
peer T.AwgPeerOptions
2626
)
@@ -92,6 +92,8 @@ func AWGSingboxTxt(content string) (*T.Endpoint, error) {
9292
i3 = val
9393
case "I4":
9494
i4 = val
95+
case "I5":
96+
i5 = val
9597
}
9698

9799
case "peer":
@@ -181,6 +183,7 @@ func AWGSingboxTxt(content string) (*T.Endpoint, error) {
181183
I2: i2,
182184
I3: i3,
183185
I4: i4,
186+
I5: i5,
184187

185188
Peers: []T.AwgPeerOptions{peer},
186189
},
@@ -281,6 +284,7 @@ func AWGSingbox(raw string) (*T.Endpoint, error) {
281284
I2: getOneOfN(u.Params, "", "i2"),
282285
I3: getOneOfN(u.Params, "", "i3"),
283286
I4: getOneOfN(u.Params, "", "i4"),
287+
I5: getOneOfN(u.Params, "", "i5"),
284288

285289
Peers: []T.AwgPeerOptions{peer},
286290
}

0 commit comments

Comments
 (0)