From 743a38c34419bbdfb50293a562c2aa435e710781 Mon Sep 17 00:00:00 2001 From: ddvk <36803246+ddvk@users.noreply.github.com> Date: Thu, 26 Sep 2024 20:54:33 +0200 Subject: [PATCH] rename binary to rmfakecloud-proxy --- Makefile | 6 +++--- README.md | 4 ++-- main.go | 2 +- scripts/installer.sh | 10 +++------- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 8d7db8f..642f16f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -BINARY=dist/rmfake-proxy -WINBINARY=dist/rmfake-proxy.exe -LINUXBINARY=dist/rmfake-proxy64 +BINARY=dist/rmfakecloud-proxy +WINBINARY=dist/rmfakecloud-proxy.exe +LINUXBINARY=dist/rmfakecloud-proxy64 INSTALLER=dist/installer.sh .PHONY: clean all: $(INSTALLER) $(WINBINARY) $(LINUXBINARY) diff --git a/README.md b/README.md index ad123cb..7749c61 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Single-minded HTTPS reverse proxy ## Usage ``` -usage: secure [-addr host:port] -cert certfile -key keyfile upstream +usage: rmfakecloud-proxy [-addr host:port] -cert certfile -key keyfile upstream -addr string listen address (default ":443") -cert string @@ -20,7 +20,7 @@ usage: secure [-addr host:port] -cert certfile -key keyfile upstream ### Example ``` -secure -cert cert.pem -key key.pem http://localhost:6060 +rmfakecloud-proxy -cert cert.pem -key key.pem http://localhost:6060 ``` ## Configfile diff --git a/main.go b/main.go index 5c30780..0ae74ef 100644 --- a/main.go +++ b/main.go @@ -58,7 +58,7 @@ func getConfig() (config *Config, err error) { if configFile != "" { var data []byte - data, err = ioutil.ReadFile(configFile) + data, err = os.ReadFile(configFile) if err != nil { return diff --git a/scripts/installer.sh b/scripts/installer.sh index 6b39ced..047aacb 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -1,8 +1,8 @@ #!/bin/bash set -e -UNIT_NAME=proxy -BINARY=rmfake-proxy +UNIT_NAME=rmfakecloud-proxy +BINARY=rmfakecloud-proxy DESTINATION="/home/root/rmfakecloud" @@ -26,19 +26,15 @@ function install_proxyservice(){ cloudurl=$1 echo "Setting cloud sync to: ${cloudurl}" workdir=$DESTINATION -cat > $workdir/proxy.cfg < /etc/systemd/system/${UNIT_NAME}.service <