Feature: add experimental provider
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package adapters
|
||||
package outbound
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -38,14 +38,16 @@ func (b *Base) SupportUDP() bool {
|
||||
return b.udp
|
||||
}
|
||||
|
||||
func (b *Base) Destroy() {}
|
||||
|
||||
func (b *Base) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(map[string]string{
|
||||
"type": b.Type().String(),
|
||||
})
|
||||
}
|
||||
|
||||
func NewBase(name string, tp C.AdapterType, udp bool) *Base {
|
||||
return &Base{name, tp, udp}
|
||||
}
|
||||
|
||||
type conn struct {
|
||||
net.Conn
|
||||
chain C.Chain
|
||||
@ -199,9 +201,3 @@ func (p *Proxy) URLTest(ctx context.Context, url string) (t uint16, err error) {
|
||||
func NewProxy(adapter C.ProxyAdapter) *Proxy {
|
||||
return &Proxy{adapter, queue.New(10), true}
|
||||
}
|
||||
|
||||
// ProxyGroupOption contain the common options for all kind of ProxyGroup
|
||||
type ProxyGroupOption struct {
|
||||
Name string `proxy:"name"`
|
||||
Proxies []string `proxy:"proxies"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user