@@ -167,30 +167,35 @@ func verifyAllFieldsCovered(t *testing.T, req *proto.SetConfigRequest) {
167167 }
168168
169169 expectedFields := map [string ]bool {
170- "ManagementUrl" : true ,
171- "AdminURL" : true ,
172- "RosenpassEnabled" : true ,
173- "RosenpassPermissive" : true ,
174- "ServerSSHAllowed" : true ,
175- "InterfaceName" : true ,
176- "WireguardPort" : true ,
177- "OptionalPreSharedKey" : true ,
178- "DisableAutoConnect" : true ,
179- "NetworkMonitor" : true ,
180- "DisableClientRoutes" : true ,
181- "DisableServerRoutes" : true ,
182- "DisableDns" : true ,
183- "DisableFirewall" : true ,
184- "BlockLanAccess" : true ,
185- "DisableNotifications" : true ,
186- "LazyConnectionEnabled" : true ,
187- "BlockInbound" : true ,
188- "NatExternalIPs" : true ,
189- "CustomDNSAddress" : true ,
190- "ExtraIFaceBlacklist" : true ,
191- "DnsLabels" : true ,
192- "DnsRouteInterval" : true ,
193- "Mtu" : true ,
170+ "ManagementUrl" : true ,
171+ "AdminURL" : true ,
172+ "RosenpassEnabled" : true ,
173+ "RosenpassPermissive" : true ,
174+ "ServerSSHAllowed" : true ,
175+ "InterfaceName" : true ,
176+ "WireguardPort" : true ,
177+ "OptionalPreSharedKey" : true ,
178+ "DisableAutoConnect" : true ,
179+ "NetworkMonitor" : true ,
180+ "DisableClientRoutes" : true ,
181+ "DisableServerRoutes" : true ,
182+ "DisableDns" : true ,
183+ "DisableFirewall" : true ,
184+ "BlockLanAccess" : true ,
185+ "DisableNotifications" : true ,
186+ "LazyConnectionEnabled" : true ,
187+ "BlockInbound" : true ,
188+ "NatExternalIPs" : true ,
189+ "CustomDNSAddress" : true ,
190+ "ExtraIFaceBlacklist" : true ,
191+ "DnsLabels" : true ,
192+ "DnsRouteInterval" : true ,
193+ "Mtu" : true ,
194+ "EnableSSHRoot" : true ,
195+ "EnableSSHSFTP" : true ,
196+ "EnableSSHLocalPortForward" : true ,
197+ "EnableSSHRemotePortForward" : true ,
198+ "DisableSSHAuth" : true ,
194199 }
195200
196201 val := reflect .ValueOf (req ).Elem ()
@@ -221,29 +226,34 @@ func TestCLIFlags_MappedToSetConfig(t *testing.T) {
221226 // Map of CLI flag names to their corresponding SetConfigRequest field names.
222227 // This map must be updated when adding new config-related CLI flags.
223228 flagToField := map [string ]string {
224- "management-url" : "ManagementUrl" ,
225- "admin-url" : "AdminURL" ,
226- "enable-rosenpass" : "RosenpassEnabled" ,
227- "rosenpass-permissive" : "RosenpassPermissive" ,
228- "allow-server-ssh" : "ServerSSHAllowed" ,
229- "interface-name" : "InterfaceName" ,
230- "wireguard-port" : "WireguardPort" ,
231- "preshared-key" : "OptionalPreSharedKey" ,
232- "disable-auto-connect" : "DisableAutoConnect" ,
233- "network-monitor" : "NetworkMonitor" ,
234- "disable-client-routes" : "DisableClientRoutes" ,
235- "disable-server-routes" : "DisableServerRoutes" ,
236- "disable-dns" : "DisableDns" ,
237- "disable-firewall" : "DisableFirewall" ,
238- "block-lan-access" : "BlockLanAccess" ,
239- "block-inbound" : "BlockInbound" ,
240- "enable-lazy-connection" : "LazyConnectionEnabled" ,
241- "external-ip-map" : "NatExternalIPs" ,
242- "dns-resolver-address" : "CustomDNSAddress" ,
243- "extra-iface-blacklist" : "ExtraIFaceBlacklist" ,
244- "extra-dns-labels" : "DnsLabels" ,
245- "dns-router-interval" : "DnsRouteInterval" ,
246- "mtu" : "Mtu" ,
229+ "management-url" : "ManagementUrl" ,
230+ "admin-url" : "AdminURL" ,
231+ "enable-rosenpass" : "RosenpassEnabled" ,
232+ "rosenpass-permissive" : "RosenpassPermissive" ,
233+ "allow-server-ssh" : "ServerSSHAllowed" ,
234+ "interface-name" : "InterfaceName" ,
235+ "wireguard-port" : "WireguardPort" ,
236+ "preshared-key" : "OptionalPreSharedKey" ,
237+ "disable-auto-connect" : "DisableAutoConnect" ,
238+ "network-monitor" : "NetworkMonitor" ,
239+ "disable-client-routes" : "DisableClientRoutes" ,
240+ "disable-server-routes" : "DisableServerRoutes" ,
241+ "disable-dns" : "DisableDns" ,
242+ "disable-firewall" : "DisableFirewall" ,
243+ "block-lan-access" : "BlockLanAccess" ,
244+ "block-inbound" : "BlockInbound" ,
245+ "enable-lazy-connection" : "LazyConnectionEnabled" ,
246+ "external-ip-map" : "NatExternalIPs" ,
247+ "dns-resolver-address" : "CustomDNSAddress" ,
248+ "extra-iface-blacklist" : "ExtraIFaceBlacklist" ,
249+ "extra-dns-labels" : "DnsLabels" ,
250+ "dns-router-interval" : "DnsRouteInterval" ,
251+ "mtu" : "Mtu" ,
252+ "enable-ssh-root" : "EnableSSHRoot" ,
253+ "enable-ssh-sftp" : "EnableSSHSFTP" ,
254+ "enable-ssh-local-port-forwarding" : "EnableSSHLocalPortForward" ,
255+ "enable-ssh-remote-port-forwarding" : "EnableSSHRemotePortForward" ,
256+ "disable-ssh-auth" : "DisableSSHAuth" ,
247257 }
248258
249259 // SetConfigRequest fields that don't have CLI flags (settable only via UI or other means).
0 commit comments