mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-18 00:54:32 +03:00
Add MTProxy, MASQUE, VPN, Link parser. Update AmneziaWG. Remove Tunneling
This commit is contained in:
21
parser/clash/socks5.go
Normal file
21
parser/clash/socks5.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package clash
|
||||
|
||||
import "github.com/sagernet/sing-box/option"
|
||||
|
||||
type Socks5Option struct {
|
||||
DialerOptions `yaml:",inline"`
|
||||
ServerOptions `yaml:",inline"`
|
||||
UserName string `yaml:"username,omitempty"`
|
||||
Password string `yaml:"password,omitempty"`
|
||||
UDP bool `yaml:"udp,omitempty"`
|
||||
}
|
||||
|
||||
func (s *Socks5Option) Build() any {
|
||||
return &option.SOCKSOutboundOptions{
|
||||
DialerOptions: s.DialerOptions.Build(),
|
||||
ServerOptions: s.ServerOptions.Build(),
|
||||
Username: s.UserName,
|
||||
Password: s.Password,
|
||||
Network: clashNetworks(s.UDP),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user