{"id":20709968,"url":"https://github.com/oxylabs/wget-proxy","last_synced_at":"2026-03-15T18:38:36.227Z","repository":{"id":134336707,"uuid":"554173311","full_name":"oxylabs/wget-proxy","owner":"oxylabs","description":"Learn how to use wget command with proxies","archived":false,"fork":false,"pushed_at":"2024-04-22T05:36:39.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T21:07:20.625Z","etag":null,"topics":["command-line","curl","downloader","proxy-list","proxy-list-github","proxy-rotator","proxy-site","rotating-proxy","socks5-proxy","socks5-proxy-list","socks5-server","socks5-server-java","web-proxy"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxylabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-10-19T11:23:45.000Z","updated_at":"2024-08-16T20:23:03.000Z","dependencies_parsed_at":"2024-01-09T17:27:42.010Z","dependency_job_id":null,"html_url":"https://github.com/oxylabs/wget-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxylabs%2Fwget-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxylabs%2Fwget-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxylabs%2Fwget-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxylabs%2Fwget-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxylabs","download_url":"https://codeload.github.com/oxylabs/wget-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242980783,"owners_count":20216285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","curl","downloader","proxy-list","proxy-list-github","proxy-rotator","proxy-site","rotating-proxy","socks5-proxy","socks5-proxy-list","socks5-server","socks5-server-java","web-proxy"],"created_at":"2024-11-17T02:09:23.478Z","updated_at":"2026-03-15T18:38:36.199Z","avatar_url":"https://github.com/oxylabs.png","language":"Shell","readme":"# How to Use Wget With Proxy\n\n[![Oxylabs promo code](https://raw.githubusercontent.com/oxylabs/product-integrations/refs/heads/master/Affiliate-Universal-1090x275.png)](https://oxylabs.io/pages/gitoxy?utm_source=877\u0026utm_medium=affiliate\u0026groupid=877\u0026utm_content=wget-proxy-github\u0026transaction_id=102f49063ab94276ae8f116d224b67)\n\n[![](https://dcbadge.limes.pink/api/server/Pds3gBmKMH?style=for-the-badge\u0026theme=discord)](https://discord.gg/Pds3gBmKMH) [![YouTube](https://img.shields.io/badge/YouTube-Oxylabs-red?style=for-the-badge\u0026logo=youtube\u0026logoColor=white)](https://www.youtube.com/@oxylabs)\n\n[\u003cimg src=\"https://img.shields.io/static/v1?label=\u0026message=wget\u0026color=brightgreen\" /\u003e](https://github.com/topics/wget)\n\n- [How to install Wget](#how-to-install-wget)\n- [Running Wget](#running-wget)\n- [Downloading a single file](#downloading-a-single-file)\n- [Changing the User-Agent](#changing-the-user-agent)\n- [Downloading multiple files](#downloading-multiple-files)\n- [Extracting links from a webpage](#extracting-links-from-a-webpage)\n- [Using proxies with Wget](#using-proxies-with-wget)\n\nWget is a popular command-line utility that can download files from the web. It’s part of the GNU Project and, as a result, commonly bundled with numerous Linux distributions.\n\nThis article will provide you with an overview of this utility.\n\nFor a detailed explanation, see our [blog post](https://oxylabs.io/blog/wget-proxy).\n\n## How to install Wget\n\nWget can be downloaded from the [official GNU channel](https://www.gnu.org/software/wget/) and installed manually.\n\nTo install Wget on Ubuntu/Debian, open the terminal and run the following command:\n\n```shell\nsudo apt-get install wget\n```\n\nTo install Wget on CentOS/RHEL, open the terminal and run the following command:\n\n```shell\nyum install wget\n```\n\nIf you’re using macOS, we highly recommend using the [Homebrew](https://brew.sh/) package manager. Open the terminal and run the following command:\n\n```shell\nbrew install wget\n```\n\nIf you’re using Windows, [Chocolatey](https://chocolatey.org/) package manager is a good choice. When using Chocolatey, run the following command from the command line or PowerShell:\n\n```powershell\nchoco install wget\n```\n\nLastly, to verify the installation of Wget, run the following command:\n\n```shell\nwget --version\n```\n\n## Running Wget\n\nOpen the terminal and enter the following:\n\n```\nwget -h\n```\n\nThis will list all the options used with the Wget command grouped in categories, such as Startup, Logging, Download, etc.\n\n### Downloading a single file\n\nTo download a single file, run Wget and type in the complete URL of the file:\n\n```\nwget https://ftp.gnu.org/gnu/wget/wget2-2.0.0.tar.lz\n```\n\n![](https://images.prismic.io/oxylabs-sm/ZGI5NGQ5ZjctMWZkNS00YjliLWFlMTYtNWQ4ZGI5MDE5Yjk2_wget_single_file.png?auto=compress,format\u0026rect=0,0,1115,402\u0026w=1115\u0026h=402\u0026fm=webp\u0026q=75)\n\n### Changing the User-Agent\n\nTo identify the User-Agent used by Wget, request this URL:\n\n```shell\nwget https://httpbin.org/user-agent\n```\n\nThis command will download a file named user-agent without any extension. To view the contents of this file, use the `cat` command:\n\n```shell\n~$ cat user-agent\n{\n  \"user-agent\": \"wget/1.21.2\"\n}\n```\n\nThe default User-Agent can be modified using the --header option:\n\n```shell\nwget --header \"user-agent: DESIRED USER AGENT\" URL-OF-FILE\n```\n\nThe following example should clarify it further:\n\n```shell\n~$ wget  --header \"user-agent: Mozilla/5.0 (Macintosh)\" https://httpbin.org/user-agent\n~$ cat user-agent\n{\n  \"user-agent\": \"Mozilla/5.0 (Macintosh)\"\n}\n```\n\n### Downloading multiple files\n\nThe following command will download files from all three URLs:\n\n```\n~$ wget http://example.com/file1.zip http://example.com/file2.zip http://example.com/file3.zip\n```\n\n**The second method** is to write all the URLs in a file and use the `-i` or `--input-file` option:\n\n```\n~$ wget --input-file=urls.txt\n~$ wget -i urls.txt\n```\n\n### Extracting links from a webpage\n\nYou can supply a URL that contains the links to the files:\n\n```shell\n~$ wget --input-file=https://ftp.gnu.org/gnu/wget\n```\n\nTo download all files with a `.sig` extension, use the following command:\n\n```shell\n~$ wget --recursive --no-parent --no-directories --no-clobber --accept=sig --input-file=https://ftp.gnu.org/gnu/wget\n```\n\n## Using proxies with Wget\n\nThe first method uses command line switches to specify the proxy server and authentication details.\n\nFirst, check your current IP address. Run Wget in quiet mode and redirect the output to the terminal instead of downloading the file:\n\n```shell\n~$ wget --quiet --output-document=- https://ip.oxylabs.io/location\n# OR\n~$ wget -q -O - https://ip.oxylabs.io/location\n```\n\nTo use a proxy that doesn’t require authentication, use two `-e` or two `--execute` switches:\n\n```shell\n~$ wget -q -O- -e use_proxy=yes -e http_proxy=12.13.14.15:1234 https://ip.oxylabs.io/location\n```\nOutput:\n```json\n{\"ip\":\"104.200.141.20\",\"providers\":{\"dbip\":{\"country\":\"US\",\"asn\":\"AS46562\",\"org_name\":\"Performive LLC\",\"city\":\"New York\",\"zip_code\":\"\",\"time_zone\":\"\",\"meta\":\"\\u003ca href='https://db-ip.com'\\u003eIP Geolocation by DB-IP\\u003c/a\\u003e\"},\"ip2location\":{\"country\":\"US\",\"asn\":\"\",\"org_name\":\"\",\"city\":\"New York City\",\"zip_code\":\"10011\",\"time_zone\":\"-05:00\",\"meta\":\"This site or product includes IP2Location LITE data available from \\u003ca href=\\\"https://lite.ip2location.com\\\"\\u003ehttps://lite.ip2location.com\\u003c/a\\u003e.\"},\"ipinfo\":{\"country\":\"US\",\"asn\":\"AS46562\",\"org_name\":\"Performive LLC\",\"city\":\"\",\"zip_code\":\"\",\"time_zone\":\"\",\"meta\":\"\\u003cp\\u003eIP address data powered by \\u003ca href=\\\"https://ipinfo.io\\\" \\u003eIPinfo\\u003c/a\\u003e\\u003c/p\\u003e\"},\"maxmind\":{\"country\":\"US\",\"asn\":\"AS46562\",\"org_name\":\"PERFORMIVE\",\"city\":\"\",\"zip_code\":\"\",\"time_zone\":\"-06:00\",\"meta\":\"This product includes GeoLite2 Data created by MaxMind, available from https://www.maxmind.com.\"}}}\n```\n\nIf the proxy server requires user authentication, set the proxy username by using the` --proxy-user` switch. Similarly, set the proxy password using the` --proxy-password` switch:\n\n```shell\n~$ wget -q -O- -e use_proxy=yes -e http_proxy=12.13.14.15:1234  --proxy-user=your_username --proxy-password=your_password https://ip.oxylabs.io/location\n```\n\n**The second method** is to use the .wgetrc configuration file.\n\nIn the ~/.wgetrc file, enter the following lines:\n\n```shell\nuse_proxy = on\nhttp_proxy = http://12.13.14.15:1234\n```\n\nIf you also need to set user authentication for the proxy, modify the file as follows:\n\n```shell\nuse_proxy = on\nhttp_proxy = http://your_username:your_password@12.13.14.15:1234\n```\n\nAs of now, every time Wget runs, it’ll use the specified proxy.\n\n```shell\n$ wget -q -O- https://ip.oxylabs.io\n# Prints IP of the proxy server\n```\n\nIf you wish to learn more about wget, see our [blog post](https://oxylabs.io/blog/wget-proxy).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxylabs%2Fwget-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxylabs%2Fwget-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxylabs%2Fwget-proxy/lists"}