upd
This commit is contained in:
parent
d11e0c71eb
commit
a767c42554
11
README.md
11
README.md
@ -13,8 +13,7 @@ install -m755 pmgr ~/.local/bin/pmgr
|
|||||||
|
|
||||||
# Usage example
|
# Usage example
|
||||||
|
|
||||||
For SSH SOCKS-proxy create template user unit ~/.config/sys‐
|
For SSH SOCKS-proxy create template user unit `~/.config/systemd/user/ssh-proxy@.service` with contents:
|
||||||
temd/user/ssh-proxy@.service with contents:
|
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[Unit]
|
[Unit]
|
||||||
@ -23,7 +22,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment="LOCAL_ADDR=localhost"
|
Environment="LOCAL_ADDR=localhost"
|
||||||
EnvironmentFile=%h/.config/proxy-manager/ssh-proxy@%i
|
EnvironmentFile=%h/.config/pmgr/ssh-proxy@%i
|
||||||
ExecStart=/usr/bin/ssh -NT \
|
ExecStart=/usr/bin/ssh -NT \
|
||||||
-o ServerAliveInterval=60 \
|
-o ServerAliveInterval=60 \
|
||||||
-o ExitOnForwardFailure=yes \
|
-o ExitOnForwardFailure=yes \
|
||||||
@ -35,8 +34,7 @@ Restart=always
|
|||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
```
|
```
|
||||||
|
|
||||||
Create environment file ~/.config/pmgr/environment/ssh-proxy@myserver
|
Create environment file `~/.config/pmgr/environment/ssh-proxy@myserver` with contents:
|
||||||
with contents:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
TARGET=user@myserver
|
TARGET=user@myserver
|
||||||
@ -44,8 +42,7 @@ LOCAL_ADDR=127.0.0.1
|
|||||||
LOCAL_PORT=1080
|
LOCAL_PORT=1080
|
||||||
```
|
```
|
||||||
|
|
||||||
In there 'mysserver' may be a domain name, SSH Hostname (set in
|
`myserver` may be a domain name, SSH Hostname (set in ~/.ssh/config) or IP address of remote server.
|
||||||
~/.ssh/config) or IP address of remote server.
|
|
||||||
|
|
||||||
Now you can enable your proxy with systemctl:
|
Now you can enable your proxy with systemctl:
|
||||||
|
|
||||||
|
4
pmgr.1
4
pmgr.1
@ -74,7 +74,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment="LOCAL_ADDR=localhost"
|
Environment="LOCAL_ADDR=localhost"
|
||||||
EnvironmentFile=%h/.config/proxy-manager/ssh-proxy@%i
|
EnvironmentFile=%h/.config/pmgr/ssh-proxy@%i
|
||||||
ExecStart=/usr/bin/ssh -NT \\
|
ExecStart=/usr/bin/ssh -NT \\
|
||||||
-o ServerAliveInterval=60 \\
|
-o ServerAliveInterval=60 \\
|
||||||
-o ExitOnForwardFailure=yes \\
|
-o ExitOnForwardFailure=yes \\
|
||||||
@ -98,7 +98,7 @@ LOCAL_PORT=1080
|
|||||||
.EE
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
In there 'mysserver' may be a domain name, SSH Hostname (set in ~/.ssh/config)
|
\fImyserver\fR may be a domain name, SSH Hostname (set in ~/.ssh/config)
|
||||||
or IP address of remote server.
|
or IP address of remote server.
|
||||||
|
|
||||||
Now you can enable your proxy with systemctl:
|
Now you can enable your proxy with systemctl:
|
||||||
|
Loading…
Reference in New Issue
Block a user