Add http/block outbound & Improve route

This commit is contained in:
世界
2022-07-03 23:23:18 +08:00
parent 18e3f43df3
commit 4fc4eb09b0
25 changed files with 408 additions and 201 deletions

View File

@@ -14,7 +14,7 @@ func New(router adapter.Router, options option.DialerOptions) N.Dialer {
} else {
dialer = newDetour(router, options)
}
if options.OverrideOptions != nil {
if options.OverrideOptions.IsValid() {
dialer = newOverride(dialer, common.PtrValueOrDefault(options.OverrideOptions))
}
return dialer

View File

@@ -22,9 +22,6 @@ type overrideDialer struct {
}
func newOverride(upstream N.Dialer, options option.OverrideStreamOptions) N.Dialer {
if !options.TLS && !options.UDPOverTCP {
return upstream
}
return &overrideDialer{
upstream,
options.TLS,