Added support for MacOS WebSSH

- Added MacOS webssh feature
- Fixed bug on no proxy rule will cause tls option null exception
This commit is contained in:
Toby Chui
2025-08-31 12:35:11 +08:00
parent 7c3a1a9cfc
commit a175c258c9
5 changed files with 30 additions and 7 deletions

1
.gitignore vendored
View File

@@ -62,3 +62,4 @@ www/html/index.html
/src/dist
/src/plugins
.DS_Store

View File

@@ -0,0 +1,18 @@
//go:build darwin && amd64
// +build darwin,amd64
package sshprox
import "embed"
/*
Binary embedding for AMD64 builds
Make sure when compile, gotty binary exists in static.gotty
*/
var (
//go:embed gotty/gotty_darwin_amd64
//go:embed gotty/.gotty
//go:embed gotty/LICENSE
gotty embed.FS
)

Binary file not shown.

View File

@@ -1426,11 +1426,17 @@
/* ------------ TLS ------------ */
updateTlsResolveList(uuid);
editor.find(".Tls_EnableSNI").prop("checked", !subd.TlsOptions.DisableSNI);
editor.find(".Tls_EnableLegacyCertificateMatching").prop("checked", !subd.TlsOptions.DisableLegacyCertificateMatching);
editor.find(".Tls_EnableAutoHTTPS").prop("checked", !!subd.TlsOptions.EnableAutoHTTPS);
if (subd.TlsOptions != null){
//Use the saved settings
editor.find(".Tls_EnableSNI").prop("checked", !subd.TlsOptions.DisableSNI);
editor.find(".Tls_EnableLegacyCertificateMatching").prop("checked", !subd.TlsOptions.DisableLegacyCertificateMatching);
editor.find(".Tls_EnableAutoHTTPS").prop("checked", !!subd.TlsOptions.EnableAutoHTTPS);
}else{
//Default settings
editor.find(".Tls_EnableSNI").prop("checked", true);
editor.find(".Tls_EnableLegacyCertificateMatching").prop("checked", false);
editor.find(".Tls_EnableAutoHTTPS").prop("checked", false);
}
editor.find(".Tls_EnableSNI").off("change").on("change", function() {
saveTlsConfigs(uuid);
});

View File

@@ -116,7 +116,6 @@
}
</style>
</head>
<body>
<link rel="stylesheet" href="../darktheme.css">
<script src="../script/darktheme.js"></script>
@@ -139,7 +138,6 @@
</div>
<div class="ui container">
<div class="ui divider"></div>
<div class="ui stackable secondary menu">
<!-- Filter Dropdown -->
<div class="ui selection dropdown" id="filterDropdown" style="margin-top:0.4em;">