diff --git a/src/cliproxy/remote-proxy-client.ts b/src/cliproxy/remote-proxy-client.ts index c8a8d8f5..7bc3d3a3 100644 --- a/src/cliproxy/remote-proxy-client.ts +++ b/src/cliproxy/remote-proxy-client.ts @@ -48,9 +48,10 @@ const DEFAULT_TIMEOUT_MS = 2000; /** * Get default port for protocol + * HTTP defaults to 8317 (CLIProxyAPI default), HTTPS to 443 (standard SSL) */ function getDefaultPort(protocol: 'http' | 'https'): number { - return protocol === 'https' ? 443 : 80; + return protocol === 'https' ? 443 : 8317; } /** diff --git a/ui/src/pages/settings.tsx b/ui/src/pages/settings.tsx index 07fdce31..235614e0 100644 --- a/ui/src/pages/settings.tsx +++ b/ui/src/pages/settings.tsx @@ -1322,7 +1322,8 @@ function ProxyContent({ const defaultLocal = { port: 8317, auto_start: true }; // Helper to get default port based on protocol - const getDefaultPort = (protocol: 'http' | 'https') => (protocol === 'https' ? 443 : 80); + // HTTP defaults to 8317 (CLIProxyAPI default), HTTPS to 443 (standard SSL) + const getDefaultPort = (protocol: 'http' | 'https') => (protocol === 'https' ? 443 : 8317); // Sync local state with config (using refs to avoid lint warnings) const hostInput = config?.remote.host ?? ''; @@ -1650,42 +1651,44 @@ function ProxyContent({ - {/* Local Proxy Settings */} -
-

Local Proxy

-
- {/* Port */} -
- - setEditedLocalPort(e.target.value)} - onBlur={saveLocalPort} - placeholder="8317" - className="font-mono max-w-32" - disabled={saving} - /> -
+ {/* Local Proxy Settings - Only show in Local mode */} + {!isRemoteMode && ( +
+

Local Proxy

+
+ {/* Port */} +
+ + setEditedLocalPort(e.target.value)} + onBlur={saveLocalPort} + placeholder="8317" + className="font-mono max-w-32" + disabled={saving} + /> +
- {/* Auto-start */} -
-
-

Auto-start

-

- Start local proxy automatically when needed -

+ {/* Auto-start */} +
+
+

Auto-start

+

+ Start local proxy automatically when needed +

+
+ + saveCliproxyServerConfig({ local: { ...localConfig, auto_start: checked } }) + } + disabled={saving} + />
- - saveCliproxyServerConfig({ local: { ...localConfig, auto_start: checked } }) - } - disabled={saving} - />
-
+ )}