💡
Knowledge
  • Home
  • Technology
    • Browser
      • Chrome / Brave
        • Known Issues
    • Messaging
      • Discord
        • Known Issues
      • Microsoft Teams
      • Telegram
    • Office Production
      • Sheets
    • Music Production
    • Operational systems
      • Docker + OSX
      • Raspberry Pi OS
      • Linux
        • Terminal
        • Known Issues
        • Desktop Environment
          • Gnome
            • How to
            • Known Issues
            • Theming
          • Kde Plasma
        • How to
          • Audio
          • Proxy
          • SSH
          • ZSH
      • Windows
    • Programming
      • Code Quality
        • Stress Tests
      • Cascading Style Sheets(CSS)
      • Database
        • Postgres
        • SQLServer
      • Design Patterns
      • DevOps
        • Cloud Platforms
        • Continuous Integration
        • Docker
          • How to
          • IPSEC VPN Server
          • Docker Compose
          • Known issues
          • Proxy
        • Swarm
      • Git
        • How to
        • Known Issues
        • Github
        • Gitlab
          • GitlabCI
          • Gitlab Runner
      • IDE / Text Editor
        • Vim
          • Commands
        • PHPStorm
        • VSCode
      • Programming Languages
        • Typescript
        • Java
          • How to
          • Spring Boot
        • Javascript
          • Known issues
          • Backend
            • NestJS
            • NodeJS
          • Frontend
            • JQuery
            • React
            • Vue
          • How to
          • Package Manager
            • Yarn
          • Packages
          • Vanilla
        • PHP
          • About
          • Cache
          • Composer
          • Docker
          • How to
          • Known Issues
          • Laravel
            • Jet Stream
            • Know Issues
            • Sanctum
            • Sail
            • Valet
          • Tools
            • PHPUnit
          • Wordpress
            • Docker
            • WP CLI
            • Known Issues
            • WooComerce
        • Python
        • Shell Script
      • Server
        • Apache2
          • Known Issues
        • Nginx
          • How To
          • Known issues
      • Tools
        • Visual Studio Code
    • Stream
      • Game
      • Twitch
      • Tests
        • Unit Tests
    • Sites
    • Specs
    • Tools
  • Pessoal
    • About me
Powered by GitBook
On this page
  • Proxy for APT
  • To disable Proxy
  • Proxy for SSH
  • Proxy for NPM
  • Verify the configs from NPM Proxy
  • Add Proxy configs for NPM
  • Remove proxy for NPM

Was this helpful?

  1. Technology
  2. Operational systems
  3. Linux
  4. How to

Proxy

Proxy for APT

  • Define the configs below in the file /etc/apt/apt.conf

Acquire::http::proxy "http://user:pass@host:port/";
Acquire::https::proxy "http://user:pass@host:port/";
Acquire::ftp::Proxy "ftp://user:pass@host:port/";
  • or define environments inside the file etc/profile

ftp_proxy="http://user:pass@host:port"
http_proxy="http://user:pass@host:port"
https_proxy="https://user:pass@host:port"
FTP_PROXY="http://user:pass@host:port"
HTTP_PROXY="http://user:pass@host:port"
HTTPS_PROXY="https://user:pass@host:port"
HTTP_PROXY_REQUEST_FULLURI="0"
HTTPS_PROXY_REQUEST_FULLURI="0"

To disable Proxy

unset http_proxy
unset https_proxy
unset ftp_proxy
unset HTTP_PROXY
unset HTTPS_PROXY
unset FTP_PROXY

Proxy for SSH

$ route -n
$ sudo route add default gw HOST
$ sudo vim /etc/rc.local

    #!bin/bash  
    route add default gw HOST

$ sudo chmod a+x /etc/rc.local

Proxy for NPM

Verify the configs from NPM Proxy

npm config get proxy

Add Proxy configs for NPM

npm config set proxy http://"user:pass"@host:port
npm config set https-proxy http://"user:pass"@host:port

Remove proxy for NPM

npm config rm proxy
npm config rm https-proxy

PreviousAudioNextSSH

Last updated 4 years ago

Was this helpful?