1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-08 10:27:10 -05:00
v2fly/proxy/socks/client_config.go

29 lines
607 B
Go
Raw Normal View History

2016-07-25 17:45:25 -04:00
package socks
import (
2016-08-20 14:55:45 -04:00
"v2ray.com/core/common/protocol"
2016-09-17 18:41:21 -04:00
"github.com/golang/protobuf/ptypes"
google_protobuf "github.com/golang/protobuf/ptypes/any"
2016-07-25 17:45:25 -04:00
)
2016-09-17 18:41:21 -04:00
func AccountEquals(a, b *google_protobuf.Any) bool {
accountA := new(Account)
if err := ptypes.UnmarshalAny(a, accountA); err != nil {
return false
}
accountB := new(Account)
if err := ptypes.UnmarshalAny(b, accountB); err != nil {
return false
}
return accountA.Equals(accountB)
}
func (this *Account) AsAny() (*google_protobuf.Any, error) {
return ptypes.MarshalAny(this)
}
2016-07-25 17:45:25 -04:00
type ClientConfig struct {
Servers []*protocol.ServerSpec
}