rename binary to rmfakecloud-proxy
This commit is contained in:
parent
3ddeb5ae39
commit
743a38c344
4 changed files with 9 additions and 13 deletions
6
Makefile
6
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)
|
||||
|
|
|
@ -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
|
||||
|
|
2
main.go
2
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
|
||||
|
|
|
@ -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 <<EOF
|
||||
URL=
|
||||
EOF
|
||||
cat > /etc/systemd/system/${UNIT_NAME}.service <<EOF
|
||||
[Unit]
|
||||
Description=reverse proxy
|
||||
Description=rmfakecloud reverse proxy
|
||||
#StartLimitIntervalSec=600
|
||||
#StartLimitBurst=4
|
||||
After=home.mount
|
||||
|
||||
[Service]
|
||||
Environment=HOME=/home/root
|
||||
#EnvironmentFile=$workdir/proxy.cfg
|
||||
WorkingDirectory=$workdir
|
||||
ExecStart=$workdir/${BINARY} -cert $workdir/proxy.bundle.crt -key $workdir/proxy.key ${cloudurl}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue