update ingress.proto

This commit is contained in:
ginuerzh
2023-10-15 15:37:45 +08:00
parent bc86458bf2
commit fc558b9a31
5 changed files with 212 additions and 17 deletions

View File

@ -21,14 +21,14 @@ type server struct {
func (s *server) Bypass(ctx context.Context, in *proto.BypassRequest) (*proto.BypassReply, error) {
reply := &proto.BypassReply{}
host := in.GetAddr()
host := in.GetHost()
if v, _, _ := net.SplitHostPort(host); v != "" {
host = v
}
if host == "example.com" {
reply.Ok = true
}
log.Printf("bypass(%s): %s, %v", in.GetClient(), in.GetAddr(), reply.Ok)
log.Printf("bypass(%s): %s/%s, %s, %v", in.GetClient(), in.GetAddr(), in.GetNetwork(), in.GetHost(), reply.Ok)
return reply, nil
}