[Refactor]
1.allow maybe empty group 2.use COMPATIBLE(DIRECT alias) when proxy group is empty 3.http provider pass through tunnel
This commit is contained in:
@ -13,7 +13,7 @@ import (
|
||||
const (
|
||||
Direct AdapterType = iota
|
||||
Reject
|
||||
|
||||
Compatible
|
||||
Shadowsocks
|
||||
ShadowsocksR
|
||||
Snell
|
||||
@ -128,7 +128,8 @@ func (at AdapterType) String() string {
|
||||
return "Direct"
|
||||
case Reject:
|
||||
return "Reject"
|
||||
|
||||
case Compatible:
|
||||
return "Compatible"
|
||||
case Shadowsocks:
|
||||
return "Shadowsocks"
|
||||
case ShadowsocksR:
|
||||
|
@ -24,6 +24,7 @@ const (
|
||||
REDIR
|
||||
TPROXY
|
||||
TUN
|
||||
INNER
|
||||
)
|
||||
|
||||
type NetWork int
|
||||
@ -59,6 +60,8 @@ func (t Type) String() string {
|
||||
return "TProxy"
|
||||
case TUN:
|
||||
return "Tun"
|
||||
case INNER:
|
||||
return "Inner"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
@ -94,6 +97,10 @@ func (m *Metadata) SourceDetail() string {
|
||||
if m.Process != "" {
|
||||
return fmt.Sprintf("%s(%s)", m.SourceAddress(), m.Process)
|
||||
} else {
|
||||
if m.Type == INNER {
|
||||
return fmt.Sprintf("[Clash]")
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s", m.SourceAddress())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user