secure_network is a zero-trust QUIC mesh and encrypted edge networking framework written in Go. It combines authenticated overlay routing, hardware-backed identity verification, RPC/gossip synchronization, and secure ingress tunneling into a unified distributed networking layer.
The system is designed for:
- secure edge gateways
- distributed service meshes
- authenticated overlay routing
- encrypted overlay backplanes (gateway-mediated; no port punch)
- hardware-bound machine identity
- QUIC-native reverse tunnels
- RPC and gossip propagation
- zero-trust infrastructure
- Encrypted QUIC overlay transport using
quic-go - Persistent peer connections
- Stream multiplexing
- Automatic reconnect handling
- Bidirectional secure overlay communication
- Distributed RPC manager
- Request/response correlation
- Broadcast notifications
- Peer-targeted calls
- Timeout handling
- Concurrent-safe pending request tracking
- Distributed gossip propagation
- Lamport logical clocks
- Signature verification
- Service-scoped handlers
- Replay protection
- Mesh-wide broadcast support
- Reverse HTTP tunnel ingress
- QUIC-backed stream forwarding
- Subdomain tunnel registration
- Machine identity authentication
- Human session authentication
- Secure overlay proxy transport
- TPM-backed service identity support
- DBSC-compatible verification flows
- RSA signature validation
- Passkey/WebAuthn integration
- Secure session enforcement
- Peer discovery and management via gateway dial-only (agents dial published gateways)
- Concurrent-safe routing tables
- Dynamic peer registration
- Broadcast routing
- Direct peer messaging over the overlay (not STUN/TURN/NAT hole punch)
- No port punching — clients and agents always initiate to 0Trust endpoints
- Concurrent-safe internal structures
- Race-condition tested
- Graceful shutdown handling
- Context-aware cancellation
- Modular router architecture
┌────────────────────┐
│ Public Clients │
└─────────┬──────────┘
│
HTTPS / HTTP3
│
┌─────────▼──────────┐
│ Tunnel Gateway │
└─────────┬──────────┘
│
QUIC Overlay Mesh
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
┌────────────┐ ┌────────────┐ ┌────────────┐
│ RPC Layer │ │ Gossip Bus │ │ PeerRoute │
└────────────┘ └────────────┘ └────────────┘
│ │ │
└─────────────────┼─────────────────┘
▼
Secure Mesh Nodes
Manages encrypted QUIC connectivity between nodes.
Responsibilities:
- peer connection lifecycle
- stream management
- ingress processing
- mesh synchronization
- tunnel coordination
Concurrent-safe peer registry and routing fabric.
Supports:
- direct peer delivery
- mesh broadcast
- peer registration/removal
- ingress handlers
Distributed RPC execution framework.
Supports:
- request/response messaging
- targeted RPC calls
- broadcast notifications
- timeout enforcement
- async handlers
Distributed state propagation layer.
Supports:
- signed gossip envelopes
- Lamport timestamps
- replay protection
- service-scoped handlers
Secure reverse ingress gateway.
Supports:
- HTTP reverse tunneling
- QUIC stream forwarding
- authenticated tunnel binding
- secure overlay ingress
-
github.com/gddisney/ultimate_db- transactional embedded database
- WAL-backed persistence
- buffer pool management
-
github.com/gddisney/logger- distributed audit logging
- structured event persistence
-
github.com/gddisney/secure_policy- policy enforcement
- session validation
- authorization controls
-
github.com/gddisney/service_keys- TPM-backed service identity
- hardware signature validation
-
github.com/gddisney/webauthnext- passkey/WebAuthn integration
- session authentication
-
github.com/quic-go/quic-go- QUIC transport layer
- multiplexed encrypted streams
go get github.com/gddisney/secure_networkpackage main
import (
"log"
"github.com/gddisney/logger"
"github.com/gddisney/secure_network"
"github.com/gddisney/ultimate_db"
)
func main() {
db := &ultimate_db.DB{}
logDispatcher, err := logger.NewLogDispatcher(
"secure_node",
db,
99,
100,
)
if err != nil {
log.Fatal(err)
}
node, err := secure_network.NewSecureNode(
db,
logDispatcher,
"localhost",
"localhost",
"Secure Mesh",
nil,
)
if err != nil {
log.Fatal(err)
}
log.Println(node != nil)
}rpc.Register(
"ping",
func(
ctx context.Context,
payload []byte,
) ([]byte, error) {
return []byte("pong"), nil
},
)resp, err := rpc.Call(
ctx,
targetNode,
"ping",
[]byte("hello"),
5*time.Second,
)gossip.RegisterHandler(
"cluster_event",
func(
ctx context.Context,
env *secure_network.GossipEnvelope,
) error {
return nil
},
)tm := secure_network.NewTunnelManager(
"443",
logger,
)
err := tm.Start()cfg := secure_network.TunnelAgentConfig{
GatewayAddr: "gateway.example.com:443",
LocalAddr: "127.0.0.1:8080",
Subdomain: "app",
IdentityType: "human",
SessionToken: "session-token",
}secure_network follows a zero-trust design:
- all peers are authenticated
- all mesh traffic is encrypted
- hardware-backed identity is supported
- sessions can be cryptographically bound
- replay attacks are mitigated
- RPC and gossip traffic can be signed
- tunnels require authenticated registration
Run standard tests:
go test -vRun race detection:
go test -race .Run all packages:
go test ./...Validated:
- QUIC mesh transport
- concurrent routing
- RPC subsystem
- gossip propagation
- tunnel registration
- race-condition safety
- secure session integration
- TPM-backed identity verification
MIT