From b9a18cf73d070a5bf3ceaf9207bdd39752a25dc9 Mon Sep 17 00:00:00 2001 From: afeiszli Date: Tue, 13 Jun 2023 15:53:24 -0400 Subject: [PATCH 1/2] remove stun --- compose/docker-compose.yml | 2 +- docker/Caddyfile | 6 - docker/Caddyfile-EE | 6 - main.go | 4 - scripts/nm-certs.sh | 1 - scripts/nm-upgrade-0-17-1-to-0-19-0.sh | 1 - stun-server/stun-server.go | 154 ------------------------- 7 files changed, 1 insertion(+), 173 deletions(-) delete mode 100644 stun-server/stun-server.go diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 505f4c343..9d6ade696 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -12,7 +12,7 @@ services: - sqldata:/root/data environment: # config-dependant vars - - STUN_LIST=stun.${NM_DOMAIN}:${STUN_PORT},stun1.netmaker.io:3478,stun2.netmaker.io:3478,stun1.l.google.com:19302,stun2.l.google.com:19302 + - STUN_LIST=stun1.netmaker.io:3478,stun2.netmaker.io:3478,stun1.l.google.com:19302,stun2.l.google.com:19302 # The domain/host IP indicating the mq broker address - BROKER_ENDPOINT=wss://broker.${NM_DOMAIN} # The base domain of netmaker diff --git a/docker/Caddyfile b/docker/Caddyfile index 8fb768770..8fb74138a 100644 --- a/docker/Caddyfile +++ b/docker/Caddyfile @@ -26,12 +26,6 @@ https://api.{$NM_DOMAIN} { reverse_proxy http://netmaker:8081 } -# STUN -https://stun.{$NM_DOMAIN} { - tls /root/certs/fullchain.pem /root/certs/privkey.pem - reverse_proxy netmaker:3478 -} - # TURN https://turn.{$NM_DOMAIN} { tls /root/certs/fullchain.pem /root/certs/privkey.pem diff --git a/docker/Caddyfile-EE b/docker/Caddyfile-EE index ddc5a727a..2b874debc 100644 --- a/docker/Caddyfile-EE +++ b/docker/Caddyfile-EE @@ -44,12 +44,6 @@ https://api.{$NM_DOMAIN} { reverse_proxy http://netmaker:8081 } -# STUN -https://stun.{$NM_DOMAIN} { - tls /root/certs/fullchain.pem /root/certs/privkey.pem - reverse_proxy netmaker:3478 -} - # TURN https://turn.{$NM_DOMAIN} { tls /root/certs/fullchain.pem /root/certs/privkey.pem diff --git a/main.go b/main.go index d63b13a9a..3729c8dd2 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,6 @@ import ( "github.com/gravitl/netmaker/netclient/ncutils" "github.com/gravitl/netmaker/servercfg" "github.com/gravitl/netmaker/serverctl" - stunserver "github.com/gravitl/netmaker/stun-server" "golang.org/x/exp/slog" ) @@ -147,9 +146,6 @@ func startControllers(wg *sync.WaitGroup, ctx context.Context) { logger.Log(0, "No Server Mode selected, so nothing is being served! Set Rest mode (REST_BACKEND) or MessageQueue (MESSAGEQUEUE_BACKEND) to 'true'.") } - // starts the stun server - wg.Add(1) - go stunserver.Start(wg, ctx) } // Should we be using a context vice a waitgroup???????????? diff --git a/scripts/nm-certs.sh b/scripts/nm-certs.sh index 09e05c685..3ba541af4 100755 --- a/scripts/nm-certs.sh +++ b/scripts/nm-certs.sh @@ -31,7 +31,6 @@ CERTBOT_PARAMS=$(cat < Date: Wed, 28 Jun 2023 13:54:40 -0400 Subject: [PATCH 2/2] Update docker-compose.yml remove stun port --- compose/docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 9d6ade696..e7b5db1f5 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -26,8 +26,6 @@ services: - TURN_SERVER_HOST=turn.${NM_DOMAIN} # domain of the turn api server - TURN_SERVER_API_HOST=https://turnapi.${NM_DOMAIN} - ports: - - "3478:3478/udp" netmaker-ui: container_name: netmaker-ui