chore: restful api display fast-open for tuic and hysteria
This commit is contained in:
@ -18,6 +18,7 @@ type Base struct {
|
||||
iface string
|
||||
tp C.AdapterType
|
||||
udp bool
|
||||
tfo bool
|
||||
rmark int
|
||||
id string
|
||||
prefer C.DNSPrefer
|
||||
@ -76,6 +77,11 @@ func (b *Base) SupportUDP() bool {
|
||||
return b.udp
|
||||
}
|
||||
|
||||
// SupportTFO implements C.ProxyAdapter
|
||||
func (b *Base) SupportTFO() bool {
|
||||
return b.tfo
|
||||
}
|
||||
|
||||
// MarshalJSON implements C.ProxyAdapter
|
||||
func (b *Base) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(map[string]string{
|
||||
@ -130,6 +136,7 @@ type BaseOption struct {
|
||||
Addr string
|
||||
Type C.AdapterType
|
||||
UDP bool
|
||||
TFO bool
|
||||
Interface string
|
||||
RoutingMark int
|
||||
Prefer C.DNSPrefer
|
||||
@ -141,6 +148,7 @@ func NewBase(opt BaseOption) *Base {
|
||||
addr: opt.Addr,
|
||||
tp: opt.Type,
|
||||
udp: opt.UDP,
|
||||
tfo: opt.TFO,
|
||||
iface: opt.Interface,
|
||||
rmark: opt.RoutingMark,
|
||||
prefer: opt.Prefer,
|
||||
|
Reference in New Issue
Block a user