manu-sapiens commited on
Commit
b79d62f
·
1 Parent(s): 74c8625

fixing small ports issue with 4444

Browse files
myNodeServer.js CHANGED
@@ -7,8 +7,8 @@ let ALREADY_STARTING = false;
7
 
8
  const PROXY_PORT = 4444;
9
  const TARGET_HOST = '0.0.0.0';
10
- const PROXY_TARGET = 'http://0.0.0.0:1688';
11
- const VERSION = '0.0.2c';
12
 
13
  console.log(`************ Omnitool Proxy Server v${VERSION} ************`);
14
  let omnitoolLogs = [];
@@ -54,7 +54,7 @@ fastify.get('/', async (request, reply) => {
54
  <head><title>Proxy Server</title></head>
55
  <body>
56
  <button id="startServerButton" onclick="startServer()">Start Omnitool Server</button>
57
- <button id="exitIframeButton" onclick="window.open('http://${localUrl}', '_blank')" disabled>Exit Iframe</button>
58
  <div id="logs" style="white-space: pre-wrap;"></div>
59
  <script>
60
  function startServer() {
@@ -73,8 +73,9 @@ fastify.get('/', async (request, reply) => {
73
  .then(data => {
74
  document.getElementById('logs').innerText = data.logs.join("\\n");
75
  if (data.ready) {
 
76
  clearInterval(interval);
77
- window.location.reload(); // Refresh the page when Omnitool is ready
78
  }
79
  });
80
  }, 1000);
 
7
 
8
  const PROXY_PORT = 4444;
9
  const TARGET_HOST = '0.0.0.0';
10
+ const PROXY_TARGET = 'http://127.0.0.1:1688';
11
+ const VERSION = '0.0.2d';
12
 
13
  console.log(`************ Omnitool Proxy Server v${VERSION} ************`);
14
  let omnitoolLogs = [];
 
54
  <head><title>Proxy Server</title></head>
55
  <body>
56
  <button id="startServerButton" onclick="startServer()">Start Omnitool Server</button>
57
+ <button id="exitIframeButton" onclick="window.open('http://${localUrl}', '_blank')" >GOTO ${localUrl}</button>
58
  <div id="logs" style="white-space: pre-wrap;"></div>
59
  <script>
60
  function startServer() {
 
73
  .then(data => {
74
  document.getElementById('logs').innerText = data.logs.join("\\n");
75
  if (data.ready) {
76
+ document.getElementById('logs').innerText = "Omnitool is ready! Please open the following link in a new tab: https://${localUrl}";
77
  clearInterval(interval);
78
+ //window.location.reload(); // Refresh the page when Omnitool is ready
79
  }
80
  });
81
  }, 1000);
packages/omni-server/src/core/Server.ts CHANGED
@@ -254,7 +254,7 @@ class MercsServer extends App implements IAppEvents {
254
  value: 'deny_all_except'
255
  });
256
 
257
- const listenOn = new URL('http://0.0.0.0:1688');
258
  listenOn.hostname = this.options.listen;
259
  listenOn.protocol = this.options.secure ? 'https' : 'http';
260
  listenOn.port = this.options.port;
 
254
  value: 'deny_all_except'
255
  });
256
 
257
+ const listenOn = new URL('http://127.0.0.1:1688');
258
  listenOn.hostname = this.options.listen;
259
  listenOn.protocol = this.options.secure ? 'https' : 'http';
260
  listenOn.port = this.options.port;