1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| package proxycfg
|
| import "github.com/v2fly/v2ray-core/v5/transport/internet"
|
| type ProxyConfig struct {
| Tag string `json:"tag"`
| TransportLayerProxy bool `json:"transportLayer"`
| }
|
| //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
|
| // Build implements Buildable.
| func (v *ProxyConfig) Build() (*internet.ProxyConfig, error) {
| if v.Tag == "" {
| return nil, newError("Proxy tag is not set.")
| }
| return &internet.ProxyConfig{
| Tag: v.Tag,
| TransportLayerProxy: v.TransportLayerProxy,
| }, nil
| }
|
|