Git Product home page Git Product logo

Comments (6)

lordnic99 avatar lordnic99 commented on June 2, 2024 2

You need to specify the client.toml to the argument part, not the path.

image
image

I have updated to this, but still same result.

from rathole.

fernvenue avatar fernvenue commented on June 2, 2024 1

As I said above, you actually just need:

You need to specify the client.toml to the argument part, not the path.

Like this:

image

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.

from rathole.

fernvenue avatar fernvenue commented on June 2, 2024

You need to specify the client.toml to the argument part, not the path.

from rathole.

ZhiShengYuan avatar ZhiShengYuan commented on June 2, 2024

You need to specify the client.toml to the argument part, not the path.

image image

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.

from rathole.

lordnic99 avatar lordnic99 commented on June 2, 2024

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;
}

image

from rathole.

lordnic99 avatar lordnic99 commented on June 2, 2024

As I said above, you actually just need:

You need to specify the client.toml to the argument part, not the path.

Like this:

image

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.

from rathole.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.