Closed lordnic99 closed 2 months ago
You need to specify the client.toml
to the argument part, not the path.
You need to specify the
client.toml
to the argument part, not the path.
I have updated to this, but still same result.
You need to specify the
client.toml
to the argument part, not the path.
I have updated to this, but still same result.
Reading the NSSM manual sounds like a good step. It's always helpful to refer to the official documentation for detailed information. Additionally, reaching out to someone familiar with this software could provide valuable insights or tips. Let's explore both avenues to resolve this issue efficiently.
Fixed by writing a C++ for calling rathole, instead of calling it directly from nssm.
#include <iostream>
#include <string>
#include <windows.h>
int main() {
std::string command_line = "C:\\HoangVPN\\rathole.exe C:\\HoangVPN\\client.toml";
STARTUPINFO si;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
memset(&pi, 0, sizeof(pi));
if (!CreateProcess(NULL, const_cast<char*>(command_line.c_str()), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
std::cerr << "Error creating process: " << GetLastError() << std::endl;
return 1;
}
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
return 0;
}
As I said above, you actually just need:
You need to specify the
client.toml
to the argument part, not the path.
Like this:
Is that hard to understand? And just like @ZhiShengYuan said, try to read the documentation first, don't assume you found a bug or something.
As I said above, you actually just need:
You need to specify the
client.toml
to the argument part, not the path.Like this:
Is that hard to understand? And just like @ZhiShengYuan said, try to read the documentation first, don't assume you found a bug or something.
Thanks, it works like charm.
Describe the bug
I'm using nssm for running the rathole in background, I got this error.
To Reproduce Steps to reproduce the behavior:
Configuration Configuration used to reproduce the behavior:
Logs
There is no log cause windows service not showing anything when get failed Environment:
rathole --version
output: rathole Build Timestamp: 2023-10-01T10:01:42.9022838Z Build Version: 0.5.0 Commit SHA: Some("ebb764ae53d7ffe4fcb45f83f7563bec5c74199d") Commit Date: Some("2023-10-01T09:55:18Z") Commit Branch: Some("detached HEAD") cargo Target Triple: x86_64-pc-windows-msvc cargo Profile: release cargo Features: base64,client,default,futures_core,futures_sink,hot_reload,noise,notify,server,snowstorm,tls,tokio_native_tls,tokio_tungstenite,tokio_util,websocket