@@ -11,12 +11,25 @@ import (
1111
1212type ShadowSocksOption struct {
1313 BaseOption
14- Password string `inbound:"password"`
15- Cipher string `inbound:"cipher"`
16- UDP bool `inbound:"udp,omitempty"`
17- MuxOption MuxOption `inbound:"mux-option,omitempty"`
18- ShadowTLS ShadowTLS `inbound:"shadow-tls,omitempty"`
19- KcpTun KcpTun `inbound:"kcp-tun,omitempty"`
14+ Password string `inbound:"password"`
15+ Cipher string `inbound:"cipher"`
16+ UDP bool `inbound:"udp,omitempty"`
17+ MuxOption MuxOption `inbound:"mux-option,omitempty"`
18+ ShadowTLS ShadowTLS `inbound:"shadow-tls,omitempty"`
19+ KcpTun KcpTun `inbound:"kcp-tun,omitempty"`
20+ SimpleObfs SimpleObfs `inbound:"simple-obfs,omitempty"`
21+ }
22+
23+ type SimpleObfs struct {
24+ Enable bool `inbound:"enable,omitempty"`
25+ Mode string `inbound:"mode,omitempty"`
26+ }
27+
28+ func (o SimpleObfs ) Build () LC.SimpleObfs {
29+ return LC.SimpleObfs {
30+ Enable : o .Enable ,
31+ Mode : o .Mode ,
32+ }
2033}
2134
2235func (o ShadowSocksOption ) Equal (config C.InboundConfig ) bool {
@@ -39,14 +52,15 @@ func NewShadowSocks(options *ShadowSocksOption) (*ShadowSocks, error) {
3952 Base : base ,
4053 config : options ,
4154 ss : LC.ShadowsocksServer {
42- Enable : true ,
43- Listen : base .RawAddress (),
44- Password : options .Password ,
45- Cipher : options .Cipher ,
46- Udp : options .UDP ,
47- MuxOption : options .MuxOption .Build (),
48- ShadowTLS : options .ShadowTLS .Build (),
49- KcpTun : options .KcpTun .Build (),
55+ Enable : true ,
56+ Listen : base .RawAddress (),
57+ Password : options .Password ,
58+ Cipher : options .Cipher ,
59+ Udp : options .UDP ,
60+ MuxOption : options .MuxOption .Build (),
61+ ShadowTLS : options .ShadowTLS .Build (),
62+ KcpTun : options .KcpTun .Build (),
63+ SimpleObfs : options .SimpleObfs .Build (),
5064 },
5165 }, nil
5266}
0 commit comments