my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.3 KiB

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