Merge remote-tracking branch 'Meta/Alpha' into Alpha
This commit is contained in:
@ -56,3 +56,13 @@ func NewCompatible() *Direct {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func NewPass() *Direct {
|
||||
return &Direct{
|
||||
Base: &Base{
|
||||
name: "Pass",
|
||||
tp: C.Pass,
|
||||
udp: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -1,33 +0,0 @@
|
||||
package outbound
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/Dreamacro/clash/component/dialer"
|
||||
|
||||
C "github.com/Dreamacro/clash/constant"
|
||||
)
|
||||
|
||||
type Pass struct {
|
||||
*Base
|
||||
}
|
||||
|
||||
// DialContext implements C.ProxyAdapter
|
||||
func (r *Pass) DialContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.Conn, error) {
|
||||
return nil, errors.New("match Pass rule")
|
||||
}
|
||||
|
||||
// ListenPacketContext implements C.ProxyAdapter
|
||||
func (r *Pass) ListenPacketContext(ctx context.Context, metadata *C.Metadata, opts ...dialer.Option) (C.PacketConn, error) {
|
||||
return nil, errors.New("match Pass rule")
|
||||
}
|
||||
|
||||
func NewPass() *Pass {
|
||||
return &Pass{
|
||||
Base: &Base{
|
||||
name: "PASS",
|
||||
tp: C.Pass,
|
||||
udp: true,
|
||||
},
|
||||
}
|
||||
}
|
@ -40,7 +40,8 @@ func (pp *proxySetProvider) MarshalJSON() ([]byte, error) {
|
||||
"type": pp.Type().String(),
|
||||
"vehicleType": pp.VehicleType().String(),
|
||||
"proxies": pp.Proxies(),
|
||||
"updatedAt": pp.updatedAt,
|
||||
//TODO maybe error because year value overflow
|
||||
"updatedAt": pp.updatedAt,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user