]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/shell-proxy/README.md
initial
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / shell-proxy / README.md
1 # shell-proxy plugin
2
3 This a pure user-space program, shell-proxy setter, written in Python3 and Zsh.
4
5 To use it, add `shell-proxy` to the plugins array in your zshrc file:
6
7 ```zsh
8 plugins=(... shell-proxy)
9 ```
10
11 ## Key features
12
13 - Supports macOS and Linux (Ubuntu, Archlinux, etc.)
14 - Supports git via setting `$GIT_SSH`
15 - Supports ssh, sftp, scp, slogin and ssh-copy-id via setting aliases
16 - Built-in autocomplete
17
18 ## Usage
19
20 ### Method 1
21
22 Set `SHELLPROXY_URL` environment variable to the URL of the proxy server:
23
24 ```sh
25 SHELLPROXY_URL="http://127.0.0.1:8123"
26 proxy enable
27 ```
28
29 ### Method 2
30
31 Write a program file in `$HOME/.config/proxy` so that the proxy URL is defined dynamically.
32 Note that the program file must be executable.
33
34 Example:
35
36 ```sh
37 #!/bin/bash
38
39 if [[ "$(uname)" = Darwin ]]; then
40   echo "http://127.0.0.1:6152" # Surge Mac
41 else
42   echo "http://127.0.0.1:8123" # polipo
43 fi
44 ```
45
46 ### Method 3
47
48 Use [method 2](#method-2) but define the location of the program file by setting the
49 `SHELLPROXY_CONFIG` environment variable:
50
51 ```sh
52 SHELLPROXY_CONFIG="$HOME/.dotfiles/proxy-config"
53 ```
54
55 ## Reference
56
57 - `$GIT_SSH`: <https://www.git-scm.com/docs/git#Documentation/git.txt-codeGITSSHcode>
58 - OpenSSH manual: <https://man.openbsd.org/ssh>
59
60 ## Maintainer
61
62 - [@septs](https://github.com/septs)