feat(pipe): use wireguard-go pipe implementation until CL299009 is resolved

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2025-11-24 09:41:29 +01:00
parent e6fee24f40
commit 9be5f6226e
6 changed files with 24 additions and 5 deletions

View File

@@ -139,7 +139,8 @@ func newService(opts ...Option) (*service, error) {
grpc.StreamInterceptor(si),
grpc.UnaryInterceptor(ui),
}
if _, ok := s.opts.lis.(*net.UnixListener); ok || strings.HasPrefix(s.opts.address, "unix://") || strings.HasPrefix(s.opts.address, `\\.\pipe\`) {
if (s.opts.lis != nil && (s.opts.lis.Addr().Network() == "unix" || s.opts.lis.Addr().Network() == "pipe")) ||
strings.HasPrefix(s.opts.address, "unix://") || strings.HasPrefix(s.opts.address, `\\.\pipe\`) {
gopts = append(gopts, grpc.Creds(peercreds.New()))
}
s.server = grpc.NewServer(append(gopts, s.opts.serverOpts...)...)