From 0f8ff10b70f91f4a69f19f1b304913474fd0779e Mon Sep 17 00:00:00 2001 From: Luciano Date: Wed, 21 Jun 2023 12:19:25 -0300 Subject: [PATCH 1/5] Update controller.go Removed /sshwifty/ folder from config --- application/controller/controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controller/controller.go b/application/controller/controller.go index 015b2ecd..4bf30f9c 100644 --- a/application/controller/controller.go +++ b/application/controller/controller.go @@ -35,7 +35,7 @@ var ( ) const ( - assetsURLPrefix = "/sshwifty/assets/" + assetsURLPrefix = "/assets/" assetsURLPrefixLen = len(assetsURLPrefix) ) @@ -79,9 +79,9 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { case "/": err = serveController(h.homeCtl, w, r, clientLogger) - case "/sshwifty/socket": + case "/socket": err = serveController(h.socketCtl, w, r, clientLogger) - case "/sshwifty/socket/verify": + case "/socket/verify": err = serveController(h.socketVerifyCtl, w, r, clientLogger) case "/robots.txt": From 2c6b2942ac797ef9c95f0bace97568408b802b8f Mon Sep 17 00:00:00 2001 From: Luciano Date: Wed, 21 Jun 2023 12:22:28 -0300 Subject: [PATCH 2/5] Update app.js Removed /sshwifty/ --- ui/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 431d41fd..f88dc558 100644 --- a/ui/app.js +++ b/ui/app.js @@ -65,7 +65,7 @@ const mainTemplate = ` `.trim(); -const socksInterface = "/sshwifty/socket"; +const socksInterface = "/socket"; const socksVerificationInterface = socksInterface + "/verify"; const socksKeyTimeTruncater = 100 * 1000; From c72e951f81a62acd76453bbec24337386d5b90f4 Mon Sep 17 00:00:00 2001 From: Luciano Date: Wed, 21 Jun 2023 12:23:09 -0300 Subject: [PATCH 3/5] Update index.html Removed /sshwifty/ --- ui/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/index.html b/ui/index.html index 6db4a19f..715297ef 100644 --- a/ui/index.html +++ b/ui/index.html @@ -49,13 +49,13 @@

Loading Sshwifty

Source code - + Third-party - Readme + Readme - License + License

From 1721d468eb7b1069f7b7d5f18838d97342de7189 Mon Sep 17 00:00:00 2001 From: Luciano Date: Wed, 21 Jun 2023 12:26:07 -0300 Subject: [PATCH 4/5] Update webpack.config.js Removed /sshwifty/ --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 113da915..4d04f788 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -189,7 +189,7 @@ module.exports = { }, devtool: inDevMode ? "inline-source-map" : "source-map", output: { - publicPath: "/sshwifty/assets/", + publicPath: "/assets/", path: path.join(__dirname, ".tmp", "dist"), filename: "[name]-[contenthash:8].js", chunkFormat: "array-push", From ab8b6c6e6068ac7b1a4d1a0c1ebb20f09f884a57 Mon Sep 17 00:00:00 2001 From: Luciano Date: Thu, 22 Jun 2023 12:40:02 -0300 Subject: [PATCH 5/5] Remove trailing folder path for assets and sockets, and added location paths for XHR calls --- ui/app.js | 6 +++--- ui/index.html | 6 +++--- webpack.config.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/app.js b/ui/app.js index f88dc558..42892d03 100644 --- a/ui/app.js +++ b/ui/app.js @@ -65,7 +65,7 @@ const mainTemplate = ` `.trim(); -const socksInterface = "/socket"; +const socksInterface = "socket"; const socksVerificationInterface = socksInterface + "/verify"; const socksKeyTimeTruncater = 100 * 1000; @@ -218,8 +218,8 @@ function startApp(rootEl) { r.webSocket = "ws://"; } - r.webSocket += location.host + socksInterface; - r.keepAlive = location.protocol + "//" + location.host + socksInterface; + r.webSocket += location.host + location.pathname + socksInterface; + r.keepAlive = location.protocol + "//" + location.host + location.pathname + socksInterface; return r; }, diff --git a/ui/index.html b/ui/index.html index 715297ef..f1dc0c52 100644 --- a/ui/index.html +++ b/ui/index.html @@ -49,13 +49,13 @@

Loading Sshwifty

Source code - + Third-party - Readme + Readme - License + License

diff --git a/webpack.config.js b/webpack.config.js index 4d04f788..8805aa48 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -189,7 +189,7 @@ module.exports = { }, devtool: inDevMode ? "inline-source-map" : "source-map", output: { - publicPath: "/assets/", + publicPath: "assets/", path: path.join(__dirname, ".tmp", "dist"), filename: "[name]-[contenthash:8].js", chunkFormat: "array-push",