精品专区-精品自拍9-精品自拍三级乱伦-精品自拍视频-精品自拍视频曝光-精品自拍小视频

網站建設資訊

NEWS

網站建設資訊

LinuxShell中curl和wget使用代理IP的示例分析-創新互聯

小編給大家分享一下Linux Shell中curl和wget使用代理IP的示例分析,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

站在用戶的角度思考問題,與客戶深入溝通,找到紫金網站設計與紫金網站推廣的解決方案,憑借多年的經驗,讓設計與互聯網技術結合,創造個性化、用戶體驗好的作品,建站類型包括:做網站、網站制作、企業官網、英文網站、手機端網站、網站推廣、主機域名雅安服務器托管、企業郵箱。業務覆蓋紫金地區。

curl 和 wget 使用代理

  • curl 支持 http、https、socks4、socks5

  • wget 支持 http、https

代理示例:

#!/bin/bash
#
# curl 支持 http、https、socks4、socks5
# wget 支持 http、https
#
# 米撲代理示例:
# /tupian/20230522/proxy.mimvp.com/demo2.php
#
# 米撲代理購買:
# /tupian/20230522/proxy.mimvp.com
#
# mimvp.com
# 2015-11-09
 
 
# http代理格式   http_proxy=http://IP:Port
# https代理格式   https_proxy=http://IP:Port
 
{'http': 'http://120.77.176.179:8888'}
curl -m 30 --retry 3 -x http://120.77.176.179:8888 /tupian/20230522/proxy.mimvp.com/exist.php     # http_proxy
wget -T 30 --tries 3 -e "http_proxy=http://120.77.176.179:8888" /tupian/20230522/proxy.mimvp.com/exist.php   # http_proxy
 
{'https': 'http://46.105.214.133:3128'}
curl -m 30 --retry 3 --proxy-insecure -x http://46.105.214.133:3128 -k https://proxy.mimvp.com/exist.php     # https_proxy
wget -T 30 --tries 3 --no-check-certificate -e "https_proxy=http://46.105.214.133:3128" https://proxy.mimvp.com/exist.php # https_proxy
 
  
# curl 支持socks
{'socks4': '101.255.17.145:1080'}
curl -m 30 --retry 3 --socks4 101.255.17.145:1080 /tupian/20230522/proxy.mimvp.com/exist.php
  
{'socks5': '82.164.233.227:45454'}
curl -m 30 --retry 3 --socks5 82.164.233.227:45454 /tupian/20230522/proxy.mimvp.com/exist.php
 
 
# wget 不支持socks

wget 配置文件設置代理

vim ~/.wgetrc
 
http_proxy=http://120.77.176.179:8888:8080
https_proxy=http://12.7.17.17:8888:8080
use_proxy = on
wait = 30
 
wget -T 30 --tries 3 /tupian/20230522/proxy.mimvp.com

Shell 設置臨時局部代理

# proxy no auth
export http_proxy=http://120.77.176.179:8888:8080
export https_proxy=http://12.7.17.17:8888:8080
 
# proxy auth
export http_proxy=http://username:password@120.77.176.179:8888:8080
export https_proxy=http://username:password@12.7.17.17:8888:8080
 
 
# 取消設置
unset http_proxy
unset https_proxy

Shell 設置系統全局代理

# 修改 /etc/profile,保存并重啟服務器
sudo vim /etc/profile  # 所有人有效
或
sudo vim ~/.bashrc  # 所有人有效
或
vim ~/.bash_profile  # 個人有效
  
  
# proxy no auth
export http_proxy=http://120.77.176.179:8888:8080
export https_proxy=http://12.7.17.17:8888:8080
 
# proxy auth
export http_proxy=http://username:password@120.77.176.179:8888:8080
export https_proxy=http://username:password@12.7.17.17:8888:8080
 
source /etc/profile
或
source ~/.bashrc
或
source ~/.bash_profile
 
 
sudo reboot

以上是“Linux Shell中curl和wget使用代理IP的示例分析”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注創新互聯行業資訊頻道!


本文標題:LinuxShell中curl和wget使用代理IP的示例分析-創新互聯
網站網址:http://m.jcarcd.cn/article/gjisi.html
主站蜘蛛池模板: 精品免费视在线观看 | 国产女同百合91 | 国产综合精品一区二 | 精品综合在线观看! | 国产手机精品一区 | 日本成人二区 | 国产爽爽视 | 91逼福利| 91九色蝌蚪 | 波多吉野一区 | 日本五月天婷久 | 国产美女精 | 国产92成人 | 国产精品视频全 | 国产视频三区 | 日本在线观 | 中文字幕精品二区 | 成人总合网| 午夜一级福利 | 国产毛多水多做爰 | 国内精品露脸在线 | 成人激情午夜福 | 91秦先生久 | 午夜福利写真片精品 | 日本三级网址狠狠 | 国产偷窥熟女精 | 精品视频91| 91人人澡人人 | 午夜免费福利体验 | 91极品国产| 国产综合图色 | 国产资源在线视 | 国产激情在线不卡 | 不卡在线播放国产 | www黄在线观看 | 成人国产第一区在 | 日本乱理伦片中文 | 日韩电影| 娇妻羞涩交换 | 国产裸果在线 | 果冻传媒视频电影 |