From 2eebb2ec6d3f46934332947b5bacc5c2ddc3afc4 Mon Sep 17 00:00:00 2001 From: Kiritow <1362050620@qq.com> Date: Tue, 2 Mar 2021 04:26:38 +0800 Subject: [PATCH] frp: update launcher --- frpc/Dockerfile | 6 +++--- frpc/{main.c => launcher.c} | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) rename frpc/{main.c => launcher.c} (94%) diff --git a/frpc/Dockerfile b/frpc/Dockerfile index ab3072d..d9cc489 100644 --- a/frpc/Dockerfile +++ b/frpc/Dockerfile @@ -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 diff --git a/frpc/main.c b/frpc/launcher.c similarity index 94% rename from frpc/main.c rename to frpc/launcher.c index eda165b..73eb550 100644 --- a/frpc/main.c +++ b/frpc/launcher.c @@ -2,7 +2,7 @@ #include #include -// 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");