some changes

This commit is contained in:
2026-03-20 17:27:41 +01:00
parent b08a57a5e8
commit 2aeb81697a
9 changed files with 175 additions and 46 deletions
+3 -7
View File
@@ -53,10 +53,8 @@ async function connect() {
});
rl.on('line', (line) => {
if (line.includes('connect to server error')) {
const reason = line.substring(line.indexOf(': ')+2);
logError('Failed to connect to tunnel, reason: ' + reason);
} else if (line.includes('invalid user or token')) logError('Failed to connect to tunnel, reason: invalid user or token');
if (line.includes('connect to server error')) logError('Failed to connect to tunnel, reason: ' + line.substring(line.indexOf(': ')+2));
else if (line.includes('invalid user or token')) logError('Failed to connect to tunnel, reason: invalid user or token');
else if (line.includes('start proxy success')) logInfo('Tunnel established successfully');
else if (line.includes('login to server success')) logInfo('Connection to tunnel server was successful');
else logDebug('Tunnel log:', line);
@@ -94,6 +92,4 @@ httpPassword = "<%= cfg.httpPassword %>"
<% } %>
`;
module.exports = {
connect
};
module.exports = connect;