Skip to content

Commit 4a13189

Browse files
committed
fix: add missing server.endpoint config parsing
- Fixed bug where server.endpoint was defined in struct but never assigned from config - This caused WireGuard configs to always use fallback domain:port instead of configured endpoint - Added proper assignment: cfg.Server.Endpoint = ko.String("server.endpoint") - Cleaned up debug logs added during investigation
1 parent 216fddc commit 4a13189

File tree

5 files changed

+7
-37
lines changed

5 files changed

+7
-37
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CLAUDE.md
33
.claude/
44
wg.conf
55
config.toml
6+
prod/
67

78
# Binaries
89
bin/

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Secure HTTP tunnels to localhost using WireGuard. Share your local development server instantly without signup or complex setup.
44

5+
**🌐 Try it now: [arbok.mrkaran.dev](https://arbok.mrkaran.dev)**
6+
57
## Quick Start
68

79
```bash
@@ -94,13 +96,13 @@ curl https://arbok.mrkaran.dev/3000
9496
### RESTful API (requires API key)
9597
```bash
9698
# Create tunnel
97-
curl -X POST -H "X-API-Key: your-key" https://tunnel.yourdomain.com/api/tunnel/3000
99+
curl -X POST -H "X-API-Key: your-key" https://arbok.mrkaran.dev/api/tunnel/3000
98100

99101
# List tunnels
100-
curl -H "X-API-Key: your-key" https://tunnel.yourdomain.com/api/tunnels
102+
curl -H "X-API-Key: your-key" https://arbok.mrkaran.dev/api/tunnels
101103

102104
# Delete tunnel
103-
curl -X DELETE -H "X-API-Key: your-key" https://tunnel.yourdomain.com/api/tunnel/{id}
105+
curl -X DELETE -H "X-API-Key: your-key" https://arbok.mrkaran.dev/api/tunnel/{id}
104106
```
105107

106108
## How It Works

cmd/server/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ func parseConfig(ko *koanf.Koanf) (*Config, error) {
179179
cfg.Server.CIDR = ko.String("server.cidr")
180180
cfg.Server.ListenPort = ko.Int("server.listen_port")
181181
cfg.Server.PrivateKey = ko.String("server.private_key")
182+
cfg.Server.Endpoint = ko.String("server.endpoint")
182183

183184
cfg.HTTP.ListenAddr = ko.String("http.listen_addr")
184185
cfg.HTTP.AllowedOrigins = ko.Strings("http.allowed_origins")

config.prod.example.toml

Lines changed: 0 additions & 34 deletions
This file was deleted.

server

-11.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)