Advertisement
Guest User

proxy stuff

a guest
Oct 21st, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. # Configure proxy
  2. ## Proxy for palemoon
  3. - **Tools** -> **Advanced** -> **Network**
  4. - Open **Settings** in **Connection** section
  5. - Click **Automatic proxy configuration URL**
  6. - Enter url of the corresponding PAC file
  7.  
  8. ## gitconfig
  9. In a **.gitconfig** in **$HOME**:
  10. ```bash
  11. [http]
  12. proxy = http://NNI:mdp@addr_proxy:port
  13. ```
  14.  
  15. ## Environment variables
  16. In **/etc/profile.d/proxy.sh** :
  17. ```bash
  18. # if the file does not exist, create it
  19. #!/bin/bash
  20. export http_proxy="http://<NNI>:<password>@<proxy.com>:<port>"
  21. export https_proxy="http://<NNI>:<password>@<proxy.com>:<port>"
  22. export HTTP_PROXY="$http_proxy"
  23. export HTTPS_PROXY="$https_proxy"
  24. ```
  25. In **/etc/profile** :
  26. ```bash
  27. # at the end of the file
  28. if [ -f /etc/profile.d/proxy.sh ]; then
  29. . /etc/profile.d/proxy.sh
  30. fi
  31. ```
  32. Reload. In Archlinux, `$mod+r`.
  33.  
  34. ## Docker
  35. ```bash
  36. # if /etc/systemd/system/docker.service.d is not present
  37. mkdir -p /etc/systemd/system/docker.service.d
  38. cd /etc/systemd/system/docker.service.d
  39. # edit/create http-proxy.conf
  40. sudo vim http-proxy.conf
  41.  
  42. # inside http-proxy
  43. # [Service]
  44. # Environment="HTTP_PROXY=http://<NNI>:<password>@<proxy.com>:<port>"
  45. # Environment="NO_PROXY=localhost,127.0.0.0/8,rte-france.com"
  46.  
  47. # save the file, then restart docker
  48. sudo systemctl daemon-reload
  49. sudo systemctl restart docker
  50. ```
  51.  
  52. ## pip
  53. ```bash
  54. # in ${HOME}/.config/pip (user) or in /etc/ (system wide)
  55. touch pip.conf
  56. # inside pip.conf
  57. # [global]
  58. # proxy = http://<NNI>:<password>@<proxy.com>:<port>
  59.  
  60. # or for one time use
  61. pip --proxy http://<NNI>:<password>@<proxy.com>:<port> install <package>
  62. ```
  63.  
  64. ## OSS Review Toolkit
  65. ```bash
  66. # In docker/build/Dockerfile
  67. # Add the environment variables before RUN
  68.  
  69. #
  70. # FROM ...
  71. # ENV http_proxy="http://<NNI>:<password>@<proxy>:<port>
  72. # ENV https_proxy="https://...."
  73.  
  74. ```
  75.  
  76. ## SVN
  77. ```bash
  78. # in ~/.subversion/servers
  79. # search for http-proxy and modify it to satisfy your needs
  80. ```
  81.  
  82. ## Mercurial
  83. ```bash
  84. cd ~
  85. vim .hgrc
  86. # [http_proxy]
  87. # host=<proxy>:<port>
  88. # user=<NNI>
  89. # passwd=<password>
  90. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement