mirror of
https://github.com/dalbodeule/hop-gate.git
synced 2025-12-08 04:45:43 +09:00
Implement initial DTLS handshake flow for server and client using pion/dtls. Load server and client configuration from .env/environment, including new debug flags and logging config. On the server: - load ServerConfig from env, including DTLS listen addr and debug flag - create DTLS listener with optional self-signed localhost cert in debug - accept DTLS sessions and run PerformServerHandshake with a dummy domain validator On the client: - load ClientConfig from env, then override with CLI flags where given - validate required fields: server_addr, domain, api_key, local_target - create DTLS client and run PerformClientHandshake - support debug mode to skip server certificate verification Also: - update go.mod/go.sum with pion/dtls and related dependencies - extend .env.example with new ports, client config, and debug flags - ignore built binaries via bin/ in .gitignore BREAKING CHANGE: client environment variables have changed. The former HOP_CLIENT_ID, HOP_CLIENT_AUTH_TOKEN and HOP_CLIENT_SERVICE_PORTS are replaced by HOP_CLIENT_DOMAIN, HOP_CLIENT_API_KEY, HOP_CLIENT_LOCAL_TARGET and HOP_CLIENT_DEBUG. Client startup now requires server_addr, domain, api_key and local_target to be provided (via env or CLI).
18 lines
359 B
Modula-2
18 lines
359 B
Modula-2
module github.com/dalbodeule/hop-gate
|
|
|
|
go 1.25.4
|
|
|
|
require (
|
|
entgo.io/ent v0.14.5
|
|
github.com/google/uuid v1.3.0
|
|
github.com/pion/dtls/v3 v3.0.7
|
|
golang.org/x/net v0.47.0
|
|
)
|
|
|
|
require (
|
|
github.com/pion/logging v0.2.4 // indirect
|
|
github.com/pion/transport/v3 v3.0.7 // indirect
|
|
golang.org/x/crypto v0.44.0 // indirect
|
|
golang.org/x/text v0.31.0 // indirect
|
|
)
|