From c500cf455bd9ef29ba006748383b236170687b27 Mon Sep 17 00:00:00 2001 From: VasilevNStas Date: Fri, 26 Jun 2026 13:42:24 +0300 Subject: [PATCH] fix: #5 add option go_package to resolve Go import conflict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All four .proto files declare `package proto` without `option go_package`, causing `protoc-gen-go` to produce Go code in package `proto` — the same name as `google.golang.org/protobuf/proto`, forcing a local alias in every importing file. Adds `option go_package = "github.com/APN-Network/protos;apnproto"` to auth.proto, ping.proto, pong.proto, and welcome.proto. Breaking-check note: the FILE_SAME_GO_PACKAGE rule in buf will flag this change until PR #3 (CI config) is merged. The wire format is unaffected; this is a generated-code directive only. Closes #5 --- auth.proto | 1 + ping.proto | 1 + pong.proto | 1 + welcome.proto | 1 + 4 files changed, 4 insertions(+) diff --git a/auth.proto b/auth.proto index d0acc93..77447f1 100644 --- a/auth.proto +++ b/auth.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package proto; +option go_package = "github.com/APN-Network/protos;apnproto"; // Auth is sent by the client to the Node as the first application // message after the TLS handshake. The Node verifies the HMAC tag diff --git a/ping.proto b/ping.proto index 421566a..44374cd 100644 --- a/ping.proto +++ b/ping.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package proto; +option go_package = "github.com/APN-Network/protos;apnproto"; // Ping is sent by the client at a regular interval (a few seconds) // to keep the tunnel alive, drive RTT measurement, and piggyback diff --git a/pong.proto b/pong.proto index 6220922..3a909a3 100644 --- a/pong.proto +++ b/pong.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package proto; +option go_package = "github.com/APN-Network/protos;apnproto"; // Lease describes the client's paid subscription as known to the // Hub. An empty Lease (ends == 0) means the client is on the free diff --git a/welcome.proto b/welcome.proto index b49064b..3fe93c6 100644 --- a/welcome.proto +++ b/welcome.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package proto; +option go_package = "github.com/APN-Network/protos;apnproto"; // Outcome of the Node's check of the preceding Auth message. enum Status {