mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 09:25:41 +08:00
add systemd service file.
This commit is contained in:
parent
f5052770c0
commit
772eef1563
37
README.md
37
README.md
@ -1,7 +1,7 @@
|
|||||||
# glider
|
# glider
|
||||||
glider is a forward proxy with several protocols support.
|
glider is a forward proxy with multiple protocols support.
|
||||||
|
|
||||||
We can set up local listeners as proxy, and forward requests to internet via forwarders.
|
we can set up local listeners as proxy, and forward requests to internet via forwarders.
|
||||||
```
|
```
|
||||||
|Forwarder ----------------->|
|
|Forwarder ----------------->|
|
||||||
Listener --> | | Internet
|
Listener --> | | Internet
|
||||||
@ -147,38 +147,7 @@ checkduration=30
|
|||||||
See [glider.conf.example](https://github.com/nadoo/glider/blob/master/glider.conf.example)
|
See [glider.conf.example](https://github.com/nadoo/glider/blob/master/glider.conf.example)
|
||||||
|
|
||||||
## Service
|
## Service
|
||||||
```bash
|
- Systemd: [https://github.com/nadoo/glider/blob/master/systemd/](https://github.com/nadoo/glider/blob/master/systemd/)
|
||||||
cd /etc/systemd/system/
|
|
||||||
vim glider.service
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
[Unit]
|
|
||||||
Description=glider
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
PermissionsStartOnly=true
|
|
||||||
ExecStartPre=/bin/mkdir -p /run/glider
|
|
||||||
ExecStartPre=/bin/chown nobody:nobody /run/glider
|
|
||||||
# NOTE: change to your glider path
|
|
||||||
ExecStart=/opt/glider/glider -config /opt/glider/glider.conf
|
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
|
||||||
ExecStop=/bin/kill -INT $MAINPID
|
|
||||||
Restart=always
|
|
||||||
User=nobody
|
|
||||||
Group=nobody
|
|
||||||
UMask=0027
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
systemctl enable glider.service
|
|
||||||
systemctl start glider.service
|
|
||||||
```
|
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
- [go-ss2](https://github.com/shadowsocks/go-shadowsocks2): the core ss protocol support
|
- [go-ss2](https://github.com/shadowsocks/go-shadowsocks2): the core ss protocol support
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# / /`_ | | | | | | \ | |_ | |_)
|
# / /`_ | | | | | | \ | |_ | |_)
|
||||||
# \_\_/ |_|__ |_| |_|_/ |_|__ |_| \
|
# \_\_/ |_|__ |_| |_|_/ |_|__ |_| \
|
||||||
#
|
#
|
||||||
# Glider is a forward proxy with several protocols support.
|
# Glider is a forward proxy with multiple protocols support.
|
||||||
#
|
#
|
||||||
# We can set up local listeners as proxy, and forward requests to internet via forwarders.
|
# We can set up local listeners as proxy, and forward requests to internet via forwarders.
|
||||||
#
|
#
|
||||||
|
14
systemd/README.md
Normal file
14
systemd/README.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
## Service
|
||||||
|
```bash
|
||||||
|
# copy service file to systemd
|
||||||
|
cp systemd/glider@.service /etc/systemd/system/
|
||||||
|
|
||||||
|
# copy config file to /etc/glider/
|
||||||
|
mkdir /etc/glider/
|
||||||
|
cp glider.conf.example /etc/glider/server.conf
|
||||||
|
|
||||||
|
# enable and start service
|
||||||
|
systemctl enable glider@server
|
||||||
|
systemctl start glider@server
|
||||||
|
```
|
||||||
|
See [glider@.service](https://github.com/nadoo/glider/blob/master/sytemd/glider@.service)
|
12
systemd/glider@.service
Normal file
12
systemd/glider@.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Glider Service (%i)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=nobody
|
||||||
|
Restart=always
|
||||||
|
ExecStart=/usr/bin/glider -config /etc/glider/%i.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user