Skip to content
Permalink
Browse files

add fod.sh script

  • Loading branch information...
robatipoor committed Mar 4, 2019
1 parent 838ba81 commit cd504c77592cfb5f566a3ac059c38e40f1fb8212
Showing with 60 additions and 0 deletions.
  1. +31 −0 README.md
  2. +29 −0 fodcmd/fod.sh
@@ -102,6 +102,37 @@ git config --global http.proxy fodev.org:8118
اگر مشکل حل نشد این لینک رو نگاه کنید
<https://github.com/freedomofdevelopers/fod/issues/181#issuecomment-416217419>

<h2 lang="fa" dir="rtl" align="right">خط فرمان لینوکس</h2>
<p lang="fa" dir="rtl" align="right">
برای نصب اسکریپت اگر از پوسته bash استفاده میکنید این دستور
</p>

```sh
curl https://raw.githubusercontent.com/freedomofdevelopers/fod/master/fodcmd/fod.sh >> \
~/.bashrc && source ~/.bashrc
```
<p lang="fa" dir="rtl" align="right">
و اگر از پوسته zsh این دستور
</p>

```sh
curl https://raw.githubusercontent.com/freedomofdevelopers/fod/master/fodcmd/fod.sh >> \
~/.zshrc && source ~/.zshrc
```
<p lang="fa" dir="rtl" align="right">
برای فعال کردن پروکسی دستور
</p>

```
fod --enable
```
<p lang="fa" dir="rtl" align="right">
و برای غیر فعال کردن پروکسی دستور
</p>

```
fod --disable
```

<p lang="fa" dir="rtl" align="right">ادامه دارد</p>
<p><a href="http://creativecommons.org/licenses/by-sa/3.0/">http://creativecommons.org/licenses/by-sa/3.0</a>
@@ -0,0 +1,29 @@
# Created by fodev.org
function fod(){
case $1 in
"--enable" | "-e")
export http_proxy=fodev.org:8118/
export https_proxy=fodev.org:8118/
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
export HTTP_PROXY=fodev.org:8118/
export HTTPS_PROXY=fodev.org:8118/
export NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
echo "enable fod proxy !"
;;
"--disable" | "-d")
unset http_proxy
unset https_proxy
unset no_proxy
unset HTTP_PROXY
unset HTTPS_PROXY
unset NO_PROXY
echo "disable fod proxy !"
;;
*)
echo "Usage : fod [-e | --enable] [-d | --disable]"
echo "Example : "
echo " fod --enable for enable fod proxy "
echo " fod --disable for disable fod proxy "
;;
esac
}

0 comments on commit cd504c7

Please sign in to comment.
You can’t perform that action at this time.