Skip to content

Commit

Permalink
Fix binding to localhost (#2)
Browse files Browse the repository at this point in the history
* fix: goreleaser config improved
* fix: daemon was listening on localhost only - switched to "any" now
  • Loading branch information
piontec authored May 29, 2023
1 parent 7e97b0b commit c8176e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Unshallow
run: git fetch --prune --unshallow
with:
fetch-depth: 0
- name: Checkout - force fetch tags
run: git fetch --force --tags
- name: Setup Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
Expand Down
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ dockers:
# goarch: arm
build_flag_templates:
- "--pull"
- "--builder=multi-arch-builder"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.name={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func main() {
logEnabled := os.Getenv("LOG_ENABLED") == "true"

// UDP
udpAddr, err := net.ResolveUDPAddr("udp", "localhost:"+listeningPort)
udpAddr, err := net.ResolveUDPAddr("udp", ":"+listeningPort)
if err != nil {
log.Println("Error resolving UDP address:", err)
os.Exit(1)
Expand All @@ -112,7 +112,7 @@ func main() {
}()

// TCP
tcpAddr, err := net.ResolveTCPAddr("tcp", "localhost:"+listeningPort)
tcpAddr, err := net.ResolveTCPAddr("tcp", ":"+listeningPort)
if err != nil {
log.Println("Error resolving TCP address:", err)
os.Exit(1)
Expand Down

0 comments on commit c8176e5

Please sign in to comment.