@@ -129,7 +129,6 @@ pub struct ProxyConfig {
129129 /// 1 MiB pipe fed without the syscall rate 8 KiB imposed.
130130 pub buffer_size : usize ,
131131 pub connect_top_n : usize ,
132- pub localhost_enabled : bool ,
133132 pub workers : usize ,
134133 /// Run one single-threaded runtime per worker, each with its own
135134 /// `SO_REUSEPORT` listener, instead of one accept thread feeding a shared
@@ -522,6 +521,19 @@ pub struct DebugConfig {
522521 pub insecure_enable_debug_rpc : bool ,
523522 #[ serde( default ) ]
524523 pub insecure_skip_attestation : bool ,
524+ /// Let the app-address `localhost` resolve to 127.0.0.1, so a hostname can
525+ /// be routed to a service on the gateway host itself.
526+ ///
527+ /// This lives under `debug` and carries the `insecure_` prefix because the
528+ /// app address is not only read from the platform's own `<id>.<base_domain>`
529+ /// grammar: it also comes from the `_dstack-app-address` TXT record of an
530+ /// arbitrary custom domain. With this on, anyone who controls any DNS zone
531+ /// can point the gateway at its own loopback -- where the admin and debug
532+ /// listeners bind precisely because being unreachable is their access
533+ /// control -- and pick the port, since the `localhost` shortcut is not a
534+ /// registered instance and so bypasses `port_policy` entirely.
535+ #[ serde( default ) ]
536+ pub insecure_localhost_backend : bool ,
525537 /// Path to pre-generated debug key data file (JSON format containing key, quote, event_log, and vm_config)
526538 #[ serde( default ) ]
527539 pub key_file : String ,
0 commit comments