feat(jdbc): support SSH tunnel and proxy for JDBC connections

Parse host:port from JDBC URLs and rewrite them when an SSH or proxy
tunnel is active, so the Java plugin connects through the local
forwarded port. Enable the SSH/Proxy tabs in the connection dialog
for JDBC.
This commit is contained in:
t8y2
2026-05-12 14:53:45 +08:00
parent c8d4a04a31
commit 45e67fae6e
3 changed files with 162 additions and 6 deletions
@@ -422,10 +422,8 @@ const selectedDbIcon = computed(() => iconTypeMap[selectedType.value] || selecte
const isJdbcConnection = computed(() => form.value.db_type === "jdbc");
const connectionUrlPlaceholder = computed(() => getUrlPlaceholder(form.value.db_type));
const canUseSsh = computed(() => form.value.db_type !== "sqlite" && form.value.db_type !== "jdbc");
const canUseProxy = computed(
() => form.value.db_type !== "sqlite" && form.value.db_type !== "duckdb" && form.value.db_type !== "jdbc",
);
const canUseSsh = computed(() => form.value.db_type !== "sqlite");
const canUseProxy = computed(() => form.value.db_type !== "sqlite" && form.value.db_type !== "duckdb");
const testResultMessage = computed(() => {
if (!testResult.value) return "";
return testResult.value.ok ? t("connection.testSuccess") : testResult.value.message;