README.md 1.04 KB
Newer Older
Septs's avatar
Septs committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Shell Proxy oh-my-zsh plugin

This a pure user-space program, shell-proxy setter, written Python3 and Bash.

100% only no side-effects, only effect **environment variables** and **aliases**

## Key feature

- Support Ubuntu, Archlinux, etc (Linux)
- Support macOS
- Support git via based-`$GIT_SSH`
- Support ssh, sftp, scp, slogin and ssh-copy-id via based-`alias`
- Built-in Auto-complete

## Usage

Method 1:

`$DEFAULT_PROXY` is the proxy URL you will set

Method 2:

Write a program to `$HOME/.config/proxy` in the file.

Example program:

```bash
#!/bin/bash
# The file path: $HOME/.config/proxy
if [[ "$OSTYPE" == "darwin"* ]]; then
  echo "http://127.0.0.1:6152" # Surge Mac
else
  echo "http://127.0.0.1:8123" # polipo
fi
```

Method 3:

The working path of **Method 2** can be changed via `$CONFIG_PROXY`

## Reference

- `$GIT_SSH`: <https://www.git-scm.com/docs/git#Documentation/git.txt-codeGITSSHcode>
- OpenSSH manual: <https://man.openbsd.org/ssh>

## Maintainer

- <https://github.com/septs>

## The oh-my-zsh plugin (shell-proxy)

Public Domain