1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-08 06:14:23 -04:00
v2fly/infra/conf/gun.go
Xiaokang Wang aaa9e788e7
Grpc Gun Transport (#757)
* introduce grpc transport structure

* fix package name inconsistency

* grpc gun transport dialer and listener

* add selective build tag

* add grpc:gun listener

* add grpc:gun config

* add generated files

* various bug fix for gun:grpc transport

* Cache dialed connections

* grpc:gun Use V2Ray Managed Dial function

* Update destination.pb.go

* Update gun.go

* GunSettings -> GunConfig

* gu -> gs

* add grpc alias

Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
Co-authored-by: kslr <kslrwang@gmail.com>
2021-03-11 16:46:17 +08:00

15 lines
296 B
Go

package conf
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/transport/internet/grpc"
)
type GunConfig struct {
ServiceName string `json:"serviceName"`
}
func (g GunConfig) Build() (proto.Message, error) {
return &grpc.Config{ServiceName: g.ServiceName}, nil
}