вторник, 31 июля 2018 г.

ubuntu proxy. total / Complex definition

Complex definition :


root@client:~# 
vi /etc/profile.d/proxy.sh
# create new (set proxy settings to the environment variables)

MY_PROXY_URL="prox.srv.world:3128"

HTTP_PROXY=$MY_PROXY_URL
HTTPS_PROXY=$MY_PROXY_URL
FTP_PROXY=$MY_PROXY_URL
http_proxy=$MY_PROXY_URL
https_proxy=$MY_PROXY_URL
ftp_proxy=$MY_PROXY_URL

export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy

root@client:~# 
source /etc/profile.d/proxy.sh
# apt proxy setting

root@client:~# 
vi /etc/apt/apt.conf
# create new

Acquire::http::proxy "http://prox.srv.world:3128/";
Acquire::https::proxy "https://prox.srv.world:3128/";
Acquire::ftp::proxy "ftp://prox.srv.world:3128/";
# wget proxy setting

root@client:~# 
vi /etc/wgetrc
# add to the end

http_proxy = prox.srv.world:3128
https_proxy = prox.srv.world:3128
ftp_proxy = prox.srv.world:3128




apt

 sudo vi /etc/apt/apt.conf.d/10proxy
___________

Acquire::http::proxy "http://ip:port/";
Acquire::https::proxy ""http://ip:port/";/";
Acquire::::Proxy "true";


_____________

*10proxy  - any name

curl

https://github.com/bagder/everything-curl/blob/master/usingcurl-proxies.md

curl -x ip:port http:/example.com/


minicube

Before minikube start,I command
 export http_proxy=http://localhost:8123
 export https_proxy=http://localhost:8123

then
minikube start --docker-env HTTP_PROXY=$http_proxy \ --docker-env HTTPS_PROXY=$https_proxy



git

https://gist.github.com/evantoli/f8c23a37eb3558ab8765

In Detail

Configure the proxy

You can configure these globally in your user ~/.gitconfig file using the --global switch, or local to a repository in its .git/config file.

Setting a global proxy

Configure a global proxy if all access to all repos require this proxy
git config --global http.proxy http://proxyUsername:proxyPassword@proxy.server.com:port

URL specific proxy

If you wish to specify that a proxy should be used for just some URLs that specify the URL as a git config subsection using http.<url>.key notation:
git config --global http.https://domain.com.proxy http://proxyUsername:proxyPassword@proxy.server.com:port
Which will result in the following in the ~/.gitconfig file:
[http]
[http "https://domain.com"]
 proxy = http://proxyUsername:proxyPassword@proxy.server.com:port

Комментариев нет:

Отправить комментарий