31 lines
575 B
Protocol Buffer
31 lines
575 B
Protocol Buffer
// protoc --go_out=. --go_opt=paths=source_relative \
|
|
// --go-grpc_out=. --go-grpc_opt=paths=source_relative \
|
|
// router.proto
|
|
|
|
syntax = "proto3";
|
|
package proto;
|
|
option go_package = "github.com/go-gost/plugin/router/proto";
|
|
|
|
message GetRouteRequest {
|
|
string dst = 1;
|
|
}
|
|
|
|
message GetRouteReply {
|
|
string net = 1;
|
|
string gateway = 2;
|
|
}
|
|
|
|
message SetRouteRequest {
|
|
string net = 1;
|
|
string gateway = 2;
|
|
}
|
|
|
|
message SetRouteReply {
|
|
bool ok = 1;
|
|
}
|
|
|
|
service Router {
|
|
rpc GetRoute(GetRouteRequest) returns (GetRouteReply);
|
|
rpc SetRoute(SetRouteRequest) returns (SetRouteReply);
|
|
}
|