frp: update launcher

This commit is contained in:
Kirigaya Kazuto 2021-03-02 04:26:38 +08:00
parent 85d15a658a
commit 2eebb2ec6d
2 changed files with 5 additions and 5 deletions

View File

@ -14,10 +14,10 @@ RUN cd /root \
&& tar -xzvf frp.tgz --strip-component=1 -C temp \
&& mkdir frp_client \
&& cp temp/frpc frp_client/frpc
COPY main.c /root/temp/
COPY launcher.c /root/temp/
RUN cd /root/temp \
&& gcc main.c -o main \
&& mv main /root/frp_client/launcher \
&& gcc launcher.c -o launcher \
&& mv launcher /root/frp_client/ \
&& chmod +x /root/frp_client/frpc \
&& chmod +x /root/frp_client/launcher

View File

@ -2,7 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
// start [-ezkn] [-p PoolSize] [-f TokenFilename] ServerIP ServerPort ProxyName ProxyType LocalPort RemotePort
// launcher [-ezkn] [-p PoolSize] [-f TokenFilename] ServerIP ServerPort ProxyName ProxyType LocalPort RemotePort
int main(int argc, char *argv[])
{
int ch = 0;
@ -123,7 +123,7 @@ int main(int argc, char *argv[])
if (!noExec)
{
fprintf(stderr, "Loading frpc...\n");
char* const callArgs[] = {"The Frp Client", "-c", "/tmp/frpc.ini", NULL};
char* const callArgs[] = {"frpc", "-c", "/tmp/frpc.ini", NULL};
if (execv("/opt/frp/frpc", callArgs) < 0)
{
perror("execv");