ProxyChains遵循GNU协议的一款适用于linux系统的网络代理设置工具。强制由任一程序发起的TCP连接请求必须通过诸如TOR 或 SOCKS4, SOCKS5 或HTTP(S) 代理。支持的认证方式包括:SOCKS4/5的用户/密码认证,HTTP的基本认证。允许TCP和DNS通过代理隧道,并且可配置多个代理。注意:ProxyChains支持:git、apt等HTTP请求。不支持:ping 走的是ICMP,故不可用。

1.redhat系列

1.1 安装proxychains工具

官方rpm中没这个工具需使用epel下载安装。epel 源配置

# 需要epel源
yum install -y proxychains-ng# 查看proxychains是否安装
which proxychains

1.2 修改配置文件两步

vi /etc/proxychains.conf第1步:拉到最下面,将已有的socks(如下)隐藏#socks4         127.0.0.1 9050
第2步:添加代理(如下示例)http 10.68.0.0 8080修改完毕示例:[root@localhost ~]# cat /etc/proxychains.conf
# proxychains.conf  VER 4.x
#
#        HTTP, SOCKS4a, SOCKS5 tunneling proxifier with DNS.# The option below identifies how the ProxyList is treated.
# only one option should be uncommented at time,
# otherwise the last appearing option will be accepted
#
#dynamic_chain
#
# Dynamic - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped)
# otherwise EINTR is returned to the app
#
strict_chain
#
# Strict - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# all proxies must be online to play in chain
# otherwise EINTR is returned to the app
#
#round_robin_chain
#
# Round Robin - Each connection will be done via chained proxies
# of chain_len length
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped).
# the start of the current proxy chain is the proxy after the last
# proxy in the previously invoked proxy chain.
# if the end of the proxy chain is reached while looking for proxies
# start at the beginning again.
# otherwise EINTR is returned to the app
# These semantics are not guaranteed in a multithreaded environment.
#
#random_chain
#
# Random - Each connection will be done via random proxy
# (or proxy chain, see  chain_len) from the list.
# this option is good to test your IDS :)# Make sense only if random_chain or round_robin_chain
#chain_len = 2# Quiet mode (no output from library)
#quiet_mode## Proxy DNS requests - no leak for DNS data
# (disable all of the 3 items below to not proxy your DNS requests)# method 1. this uses the proxychains4 style method to do remote dns:
# a thread is spawned that serves DNS requests and hands down an ip
# assigned from an internal list (via remote_dns_subnet).
# this is the easiest (setup-wise) and fastest method, however on
# systems with buggy libcs and very complex software like webbrowsers
# this might not work and/or cause crashes.
proxy_dns# method 2. use the old proxyresolv script to proxy DNS requests
# in proxychains 3.1 style. requires `proxyresolv` in $PATH
# plus a dynamically linked `dig` binary.
# this is a lot slower than `proxy_dns`, doesn't support .onion URLs,
# but might be more compatible with complex software like webbrowsers.
#proxy_dns_old# method 3. use proxychains4-daemon process to serve remote DNS requests.
# this is similar to the threaded `proxy_dns` method, however it requires
# that proxychains4-daemon is already running on the specified address.
# on the plus side it doesn't do malloc/threads so it should be quite
# compatible with complex, async-unsafe software.
# note that if you don't start proxychains4-daemon before using this,
# the process will simply hang.
#proxy_dns_daemon 127.0.0.1:1053# set the class A subnet number to use for the internal remote DNS mapping
# we use the reserved 224.x.x.x range by default,
# if the proxified app does a DNS request, we will return an IP from that range.
# on further accesses to this ip we will send the saved DNS name to the proxy.
# in case some control-freak app checks the returned ip, and denies to
# connect, you can use another subnet, e.g. 10.x.x.x or 127.x.x.x.
# of course you should make sure that the proxified app does not need
# *real* access to this subnet.
# i.e. dont use the same subnet then in the localnet section
#remote_dns_subnet 127
#remote_dns_subnet 10
remote_dns_subnet 224# Some timeouts in milliseconds
tcp_read_time_out 15000
tcp_connect_time_out 8000### Examples for localnet exclusion
## localnet ranges will *not* use a proxy to connect.
## note that localnet works only when plain IP addresses are passed to the app,
## the hostname resolves via /etc/hosts, or proxy_dns is disabled or proxy_dns_old used.## Exclude connections to 192.168.1.0/24 with port 80
# localnet 192.168.1.0:80/255.255.255.0## Exclude connections to 192.168.100.0/24
# localnet 192.168.100.0/255.255.255.0## Exclude connections to ANYwhere with port 80
# localnet 0.0.0.0:80/0.0.0.0
# localnet [::]:80/0## RFC6890 Loopback address range
## if you enable this, you have to make sure remote_dns_subnet is not 127
## you'll need to enable it if you want to use an application that
## connects to localhost.
# localnet 127.0.0.0/255.0.0.0
# localnet ::1/128## RFC1918 Private Address Ranges
# localnet 10.0.0.0/255.0.0.0
# localnet 172.16.0.0/255.240.0.0
# localnet 192.168.0.0/255.255.0.0### Examples for dnat
## Trying to proxy connections to destinations which are dnatted,
## will result in proxying connections to the new given destinations.
## Whenever I connect to 1.1.1.1 on port 1234 actually connect to 1.1.1.2 on port 443
# dnat 1.1.1.1:1234  1.1.1.2:443## Whenever I connect to 1.1.1.1 on port 443 actually connect to 1.1.1.2 on port 443
## (no need to write :443 again)
# dnat 1.1.1.2:443  1.1.1.2## No matter what port I connect to on 1.1.1.1 port actually connect to 1.1.1.2 on port 443
# dnat 1.1.1.1  1.1.1.2:443## Always, instead of connecting to 1.1.1.1, connect to 1.1.1.2
# dnat 1.1.1.1  1.1.1.2# ProxyList format
#       type  ip  port [user pass]
#       (values separated by 'tab' or 'blank')
#
#       only numeric ipv4 addresses are valid
#
#
#        Examples:
#
#                socks5    192.168.67.78    1080    lamer    secret
#        http    192.168.89.3    8080    justu    hidden
#         socks4    192.168.1.49    1080
#            http    192.168.39.93    8080
#
#
#       proxy types: http, socks4, socks5, raw
#         * raw: The traffic is simply forwarded to the proxy without modification.
#        ( auth types supported: "basic"-http  "user/pass"-socks )
#
[ProxyList]
# add proxy here ...
# meanwile
# defaults set to "tor"
#socks4     127.0.0.1 9050
http 10.168.0.0 8080

1.3 使用

使用格式:
proxychains4 yum install net-tools例:root@localhost ~]# proxychains4 yum install net-tools[proxychains] config file found: /etc/proxychains.conf[proxychains] preloading /usr/lib64/proxychains-ng/libproxychains4.so[proxychains] DLL init: proxychains-ng 4.16Last metadata expiration check: 3:16:32 ago on Mon Feb  6 10:04:01 2023.Package net-tools-2.0-0.62.20160912git.el9.x86_64 is already installed.Dependencies resolved.Nothing to do.Complete![root@localhost ~]# 

2.debian系列

2.1 安装

1.sudo apt install proxychains2.sudo vim /etc/proxychains.conf3.1)拉倒最下面,将已有的socks(如下)隐藏#socks4         127.0.0.1 9050 2)添加代理(如下示例),判断这个代理是否可用就是通过设置中的代理设置看能都联网。http 10.68.0.0 80804.应用方式:
usage:proxychains <prog> [args]demo:1)proxychains git pull  #下图22)sudo proxychains apt-get update #下图3#这个地方sudo的位置一定不要写错了,否则会出错。注:虚拟机使用桥接网络时,IPv4时一定要选Automatic(DHCP),如果使用Manaul会有问题。        

Linux--Configure Proxy相关推荐

  1. linux, configure --prefix=/有什么用

    "linux, configure --prefix=/"的作用是:编译的时候用来指定程序存放路径 . 1.不指定prefix,可执行文件默认放在/usr /local/bin,库 ...

  2. linux configure 的 --prefix 参数的作用

    linux configure --prefix 的作用是:编译的时候用来指定程序存放路径 . 如下面示例: cd keepalived-1.2.18/ && ./configure ...

  3. Linux ./configure --prefix 命令是什么意思?

    源码的安装一般由3个步骤组成:配置(configure).编译(make).安装(makeinstall). Configure是一个可执行脚本,它有很多选项,在待安装的源码路径下使用命令./conf ...

  4. Linux configure 参数解释,程序的这装,卸载

    2019独角兽企业重金招聘Python工程师标准>>> Linux环境下的软件安装,并不是一件容易的事情:如果通过源代码编译后在安装,当然事情就更为复杂一些:现在安装各种软件的教程都 ...

  5. Linux configure 参数解释

    Linux环境下的软件安装,并不是一件容易的事情:如果通过源代码编译后在安装,当然事情就更为复杂一些:现在安装各种软件的教程都非常普遍:但万变不离其中,对基础知识的扎实掌握,安装各种软件的问题就迎刃而 ...

  6. linux apt-get proxy

    sudo vi /etc/apt/apt.conf.d/50unattended-upgrades Acquire::http::proxy "http://10.0.0.1:8080&qu ...

  7. linux -- ./configure --prefix 命令

    源码的安装一般由3个步骤组成:配置(configure).编译(make).安装(make install). Configure是一个可执行脚本,它有很多选项,在待安装的源码路径下使用命令./con ...

  8. 【已解答】Linux ./configure --prefix 命令是什么意思?

    源码的安装一般由3个步骤组成:配置(configure).编译(make).安装(make install). Configure是一个可执行脚本,它有很多选项,在待安装的源码路径下使用命令./con ...

  9. linux eth0 proxy arp,在interface vlan下敲no ip proxy-arp什么意思

    poj2305-Basic remains(进制转换 + 大整数取模) 进制转换 + 大整数取模一,题意: 在b进制下,求p%m,再装换成b进制输出. 其中p为b进制大数1000位以内,m为b进制数9 ...

  10. linux dns proxy,Linux下解决DNS污染

    官方的dnscrypt提供了安装脚本. 1 安装 wget https://download.dnscrypt.org/dnscrypt-proxy/binaries/linux/dnscrypt-p ...

最新文章

  1. 程序员面对下列技术问题,如何做决策
  2. 基于 HTTP 协议的 3 种实时数据获取技术
  3. ES批量提交-RestHighLevelClient
  4. Matlab | Matlab从入门到放弃(6)——数组
  5. 炼丹面试官的面试笔记
  6. leetcode 485. 最大连续 1 的个数(Java版)
  7. 【转】1:C#的三种异步的详细介绍及实现
  8. java中白盒测试用例_基于JAVA开发的中国象棋游戏的开发与研究白盒测试用例.doc...
  9. Android Studio1.4.x JNI开发基础 - 简单实例
  10. 天亮了起来的飞鸽传书官方下载
  11. scala学习--难点
  12. 为什么一定要重视隐式反馈?
  13. 我用微笑剪辑我的微电影 ---六月实习总结
  14. Newton迭代法求无约束目标函数极小值matlab实现
  15. jasperprint java_jasperReport的一些参数
  16. Vue实现Word文档在线预览功能(内网、外网)!!!
  17. C++训练:自由落体问题
  18. 加拿大计算机专业前八大学,加拿大留学:计算机工程专业排名前八的名校详情...
  19. A. 拼音魔法 大学生程序设计邀请赛(华东师范大学)
  20. 阿里双11突遭断网断电!最惊险一幕刚刚曝光

热门文章

  1. Java中com.jcraft.jsch.JSch讲解
  2. SG函数和SG定理【详解】
  3. 向量代数与空间解析几何
  4. 潮起潮落,自助餐还是被“吃”垮了
  5. 解决Mac OS 山猫10.8下Xcode无法更新以及速度慢的问题
  6. Linux开机自启动
  7. 集中式存储与分布式存储
  8. BLAM源码解析(三)—— 定时器总揽大局
  9. 2023 计算机职业规划
  10. KBL410-ASEMI整流桥KBL410