Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

感谢作者的努力,刚部署成功了,提点优化建议。 #29

Open
letmebe opened this issue Sep 19, 2020 · 1 comment
Open

Comments

@letmebe
Copy link

letmebe commented Sep 19, 2020

目前只测试了rdp客户端

可以考虑将windows客户端直接部署为服务,就可以随机启动了:

winsw/winsw: A wrapper executable that can run any executable as a Windows service, in a permissive license.
https://github.com/winsw/winsw

只需要在frpc客户端文件夹下:
将winsw.exe放进去改名为例如frpcs.exe,然后增加同名的配置文件frpcs.xml

<configuration>
  
  <!-- ID of the service. It should be unique accross the Windows system-->
  <id>Frpc</id>
  <!-- Display name of the service -->
  <name>Frpc Service</name>
  <!-- Service description -->
  <description>网络映射服务</description>
  
  <!-- Path to the executable, which should be started -->
  <executable>%BASE%\frpc.exe</executable>

</configuration>

同时修改open.bat 安装并启动服务:

frpcs install
sc start Frpc

我把这三个文件添加到现有jar包,重新打包后build docker镜像,实验下载客户端没问题。

客户端配置文件frpc.ini 中的 server_addr 是IP地址,这个我感觉算是个bug,因为已经配置了服务器的域名但没有用上,建议后期修复。

建议加上auth_token 配置项,采用默认值token不太安全。

@Zo3i
Copy link
Owner

Zo3i commented Sep 19, 2020

非常感谢,你提的建议。有时间我会加上auth_token的配置,由于Web 穿透需要域名所以需要添加域名,如果你用不上随便填一个即可。暂时就不做修改了。最后自启动的话,你提供的这个思路我会参考的,后期找个简洁合适的方法加入。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants