mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-14 00:51:12 +03:00
Add MTProxy, MASQUE, VPN, Link parser. Update AmneziaWG. Remove Tunneling
This commit is contained in:
23
parser/clash/http.go
Normal file
23
parser/clash/http.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package clash
|
||||
|
||||
import "github.com/sagernet/sing-box/option"
|
||||
|
||||
type HttpOption struct {
|
||||
DialerOptions `yaml:",inline"`
|
||||
ServerOptions `yaml:",inline"`
|
||||
*TLSOptions `yaml:",inline"`
|
||||
UserName string `yaml:"username,omitempty"`
|
||||
Password string `yaml:"password,omitempty"`
|
||||
Headers map[string]string `yaml:"headers,omitempty"`
|
||||
}
|
||||
|
||||
func (h *HttpOption) Build() any {
|
||||
return &option.HTTPOutboundOptions{
|
||||
DialerOptions: h.DialerOptions.Build(),
|
||||
ServerOptions: h.ServerOptions.Build(),
|
||||
Username: h.UserName,
|
||||
Password: h.Password,
|
||||
OutboundTLSOptionsContainer: clashTLSOptions(h.Server, h.TLSOptions),
|
||||
Headers: clashHeaders(h.Headers),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user