mihomo/listener/inbound/mux.go

26 lines
574 B
Go
Raw Normal View History

2023-11-23 08:20:26 +08:00
package inbound
import "github.com/metacubex/mihomo/listener/sing"
type MuxOption struct {
Padding bool `inbound:"padding,omitempty"`
Brutal BrutalOptions `inbound:"brutal,omitempty"`
}
type BrutalOptions struct {
Enabled bool `inbound:"enabled,omitempty"`
Up string `inbound:"up,omitempty"`
Down string `inbound:"down,omitempty"`
}
func (m MuxOption) Build() sing.MuxOption {
return sing.MuxOption{
Padding: m.Padding,
Brutal: sing.BrutalOptions{
Enabled: m.Brutal.Enabled,
Up: m.Brutal.Up,
Down: m.Brutal.Down,
},
}
}