GithubHelp home page GithubHelp logo

Comments (11)

lazy-luo avatar lazy-luo commented on May 14, 2024

这个是没有找到配置文件
默认情况配置文件会在可执行文件当前目录查找,找不到配置文件会要求输入-u来指定用户id及index
指定配置文件全路径请用-f 参数指定

from smargate.

lazy-luo avatar lazy-luo commented on May 14, 2024

“另外手机上的访问点和描述都不正常,只显示
访问点:network entry.
描述:common entry of intern net.”
这是因为你用-u执行的,系统会给个默认的描述。

from smargate.

lazy-luo avatar lazy-luo commented on May 14, 2024

代理服务端无配置启动不用-u参数,使用-m xxx试试,xxx为代理服务器端口号
个人比较懒没做详细的命令行教程,一般来讲依赖配置文件就都ok了

from smargate.

heartnn avatar heartnn commented on May 14, 2024

大哥你这个不严谨啊,如果我配置文件放到/root/smargate,那么我必须执行cd /root/smargate && ./proxy_server bulabula,而root用户环境默认执行是在/root,所以我执行/root/smargate/proxy_server,程序会检测配置文件应该在/root里,这样错误的。

所以我的systemd也得改一下了,以前我得到对的结果,可能就是我先执行了cd /root/smargate

from smargate.

lazy-luo avatar lazy-luo commented on May 14, 2024

1、严谨点来讲,默认获取配置文件路径为当前工作目录
2、你可以使用-f 指定配置文件路径
能用就行,不必纠结

from smargate.

heartnn avatar heartnn commented on May 14, 2024

写systemd服务的时候,它可不管你是什么工作目录吧,所有路径都必须是绝对路径。
这个-f 折腾我好长时间啊。

from smargate.

lazy-luo avatar lazy-luo commented on May 14, 2024

1、-f 能解决你的问题吧。
2、如你所愿,还是决定严谨点吧,方便至上
更新见网盘~

from smargate.

heartnn avatar heartnn commented on May 14, 2024

更新真快 image

from smargate.

satnosun avatar satnosun commented on May 14, 2024

大哥你这个不严谨啊,如果我配置文件放到/root/smargate,那么我必须执行cd /root/smargate && ./proxy_server bulabula,而root用户环境默认执行是在/root,所以我执行/root/smargate/proxy_server,程序会检测配置文件应该在/root里,这样错误的。

所以我的systemd也得改一下了,以前我得到对的结果,可能就是我先执行了cd /root/smargate

您好,能问一下您的systemd的配置文件是怎么写的吗?我写的总是无法开机自启,需要手动start。

from smargate.

heartnn avatar heartnn commented on May 14, 2024

大哥你这个不严谨啊,如果我配置文件放到/root/smargate,那么我必须执行cd /root/smargate && ./proxy_server bulabula,而root用户环境默认执行是在/root,所以我执行/root/smargate/proxy_server,程序会检测配置文件应该在/root里,这样错误的。
所以我的systemd也得改一下了,以前我得到对的结果,可能就是我先执行了cd /root/smargate

您好,能问一下您的systemd的配置文件是怎么写的吗?我写的总是无法开机自启,需要手动start。

smargate.service

[Unit]
Description=smarGate Proxy Daemon
After=network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/root/smargate/proxy_server -f /root/smargate/conf-proxy.xml
ExecStop=/bin/kill $MAINPID
PIDFile=/run/smargate.pid
Restart=always

[Install]
WantedBy=multi-user.target

就这样应该就行了,systemctl start以后ps查一下后台看看是否运行成功,或者看systemctl的status也可以。

from smargate.

satnosun avatar satnosun commented on May 14, 2024

就这样应该就行了,systemctl start以后ps查一下后台看看是否运行成功,或者看systemctl的status也可以。

多谢指导,可以了。

from smargate.

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.