Refactor RDP proxy handling and update related tests
This commit is contained in:
@@ -169,6 +169,9 @@ func (g *Gateway) Snapshot() map[string]any {
|
||||
|
||||
out := map[string]any{
|
||||
"running": running,
|
||||
"service_role": "ipv4-egress",
|
||||
"service_class": "vpn_packets",
|
||||
"adapter_contract": "fabric_channel_to_ipv4_nat",
|
||||
"transport": g.transportName(),
|
||||
"poll_timeout_ms": g.PollTimeout.Milliseconds(),
|
||||
"client_to_gateway_batches": g.clientToGatewayBatches.Load(),
|
||||
@@ -234,14 +237,7 @@ func (g *Gateway) setStopped(err error) {
|
||||
|
||||
func (g *Gateway) normalize() error {
|
||||
if g.Transport == nil {
|
||||
if g.API == nil {
|
||||
return fmt.Errorf("api client or packet transport is required")
|
||||
}
|
||||
g.Transport = BackendPacketTransport{
|
||||
API: g.API,
|
||||
ClusterID: g.ClusterID,
|
||||
VPNConnectionID: g.VPNConnectionID,
|
||||
}
|
||||
return fmt.Errorf("fabric packet transport is required; backend packet relay fallback is disabled")
|
||||
}
|
||||
if g.ClusterID == "" || g.VPNConnectionID == "" {
|
||||
return fmt.Errorf("cluster id and vpn connection id are required")
|
||||
|
||||
Reference in New Issue
Block a user