From 30ae5753536efecdc065c48f3a0db2ee33db5d83 Mon Sep 17 00:00:00 2001 From: leafee98 Date: Sun, 17 Sep 2023 21:56:13 +0800 Subject: [PATCH] Add README --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b826e8 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# proxyenv + +This program is designed to be used like proxychains, that is + +`proxyenv ` + +This program used to be a simple bash function, firsted introduced +at [A shell function to set environemt for any single command (Title has been translated)](https://blog.leafee98.com/posts/%E4%B8%BA%E5%8D%95%E4%B8%80%E5%91%BD%E4%BB%A4%E8%AE%BE%E7%BD%AE%E4%BB%A3%E7%90%86%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E7%9A%84%E7%BB%88%E7%AB%AF%E5%87%BD%E6%95%B0/). + +It works most of the time, but when using other command wrappers like `sudo proxyenv cmd`, +the shell function will not work anymore, because in the context of sudo, the function +proxyenv is inaccessible. + +So I make it as an bash script, which still accessible inside any other program wrappers, +that's this program. + +## Usage + +``` +proxyenv +``` + +## Configuration + +If environemt `PROXYENV_CONFPATH` is set, the program will use the path indicted by it to +read the proxy actually to be used. Otherwise `/etc/proxyenv.conf` will be used. + +The configuration file (default `/etc/proxyenv.conf`) will be sourced when proxyenv run, +so take care no let this file's permission to open, 755 is suggested. + +For entry detail of configuration file, see [proxyenv.conf](/proxyenv.conf) in this repository. + +## Misc + +### Install on Archlinux + +Since I add a PKGBUILD at the root of repository, you can use the following command +to build and install this program on Archlinux. + +``` +makepkg +pacman -U +```