1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 18:31:59 +00:00
ohmyzsh/plugins/shell-proxy
2020-11-20 12:42:51 +01:00
..
proxy.py fix(shell-proxy): change NAME env variable for WSL clash (#9447) 2020-11-20 12:42:51 +01:00
README.md Add shell-proxy plugin (#8692) 2020-05-24 18:48:43 +02:00
shell-proxy.plugin.zsh Add shell-proxy plugin (#8692) 2020-05-24 18:48:43 +02:00
ssh-agent.py fix(shell-proxy): change NAME env variable for WSL clash (#9447) 2020-11-20 12:42:51 +01:00
ssh-proxy.py Add shell-proxy plugin (#8692) 2020-05-24 18:48:43 +02:00

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:

#!/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

Maintainer

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

Public Domain