feat: add linsters
This commit is contained in:
@ -13,6 +13,8 @@ import (
|
||||
C "github.com/Dreamacro/clash/constant"
|
||||
"github.com/Dreamacro/clash/hub/executor"
|
||||
P "github.com/Dreamacro/clash/listener"
|
||||
"github.com/Dreamacro/clash/listener/sing_tun"
|
||||
"github.com/Dreamacro/clash/listener/tuic"
|
||||
"github.com/Dreamacro/clash/log"
|
||||
"github.com/Dreamacro/clash/tunnel"
|
||||
|
||||
@ -67,10 +69,10 @@ type tunSchema struct {
|
||||
|
||||
MTU *uint32 `yaml:"mtu" json:"mtu,omitempty"`
|
||||
//Inet4Address *[]config.ListenPrefix `yaml:"inet4-address" json:"inet4-address,omitempty"`
|
||||
Inet6Address *[]config.ListenPrefix `yaml:"inet6-address" json:"inet6-address,omitempty"`
|
||||
Inet6Address *[]sing_tun.ListenPrefix `yaml:"inet6-address" json:"inet6-address,omitempty"`
|
||||
StrictRoute *bool `yaml:"strict-route" json:"strict-route,omitempty"`
|
||||
Inet4RouteAddress *[]config.ListenPrefix `yaml:"inet4-route-address" json:"inet4-route-address,omitempty"`
|
||||
Inet6RouteAddress *[]config.ListenPrefix `yaml:"inet6-route-address" json:"inet6-route-address,omitempty"`
|
||||
Inet4RouteAddress *[]sing_tun.ListenPrefix `yaml:"inet4-route-address" json:"inet4-route-address,omitempty"`
|
||||
Inet6RouteAddress *[]sing_tun.ListenPrefix `yaml:"inet6-route-address" json:"inet6-route-address,omitempty"`
|
||||
IncludeUID *[]uint32 `yaml:"include-uid" json:"include-uid,omitempty"`
|
||||
IncludeUIDRange *[]string `yaml:"include-uid-range" json:"include-uid-range,omitempty"`
|
||||
ExcludeUID *[]uint32 `yaml:"exclude-uid" json:"exclude-uid,omitempty"`
|
||||
@ -116,7 +118,7 @@ func pointerOrDefaultString(p *string, def string) string {
|
||||
return def
|
||||
}
|
||||
|
||||
func pointerOrDefaultTun(p *tunSchema, def config.Tun) config.Tun {
|
||||
func pointerOrDefaultTun(p *tunSchema, def sing_tun.Tun) sing_tun.Tun {
|
||||
if p != nil {
|
||||
def.Enable = p.Enable
|
||||
if p.Device != nil {
|
||||
@ -174,7 +176,7 @@ func pointerOrDefaultTun(p *tunSchema, def config.Tun) config.Tun {
|
||||
return def
|
||||
}
|
||||
|
||||
func pointerOrDefaultTuicServer(p *tuicServerSchema, def config.TuicServer) config.TuicServer {
|
||||
func pointerOrDefaultTuicServer(p *tuicServerSchema, def tuic.TuicServer) tuic.TuicServer {
|
||||
if p != nil {
|
||||
def.Enable = p.Enable
|
||||
if p.Listen != nil {
|
||||
|
Reference in New Issue
Block a user