zoukankan      html  css  js  c++  java
  • Centos7下安装配置Redsocks

      Redsocks是一个开源的网络程序,代码依赖开源的libevent网络库。Redsocks允许你将所有TCP连接重定向到SOCKS或HTTPS代理,比如Shadowsocks(Centos7下安装配置Shadowsocks)。通常的用途是流量透传或流量转发,首先将本机上目的地为的某些特定IP的流量转发到Redsocks的监听端口上(本文为8888),之后Redsocks会将这些流量再转发给后端的Shadowsocks,再通过shadowocks转到更远的地方。

    1、下载编译

    [root@localhost ~]# yum install libevent-devel git gcc
    [root@localhost ~]# mkdir ~/shadowsocks
    [root@localhost ~]# cd ~/shadowsocks
    [root@localhost ~]# git clone https://github.com/darkk/redsocks
    [root@localhost ~]# cd ~/shadowsocks/redsocks
    [root@localhost ~]# make
    [root@localhost ~]# cp ~/shadowsocks/redsocks/redsocks /usr/local/bin/

     2、新建配置文件(默认即可,无需更改)

    [root@localhost ~]# vi /etc/redsocks.conf
    
    base {
            log_debug = off;
            log_info = on;
            log = stderr;
            daemon = off;
            redirector = iptables;
    }
    redsocks {
            local_ip = 127.0.0.1;
            local_port = 8888;
            ip = 127.0.0.1;
            port = 1080;
            type = socks5;
    }

     3、启动/停止

    启动
    [root@localhost ~]# nohup /usr/local/bin/redsocks -c /etc/redsocks.conf &
    停止
    [root@localhost ~]# kill -9 对应进程
  • 相关阅读:
    oracel 复制A列的内容到列
    视图转为表
    面向对象
    银弹效应
    解决linux删除文件后空间没有释放问题
    HttpAnalyzerStdV7安装教程
    HttpUploader6.2-process版本
    Chrome浏览器控件安装方法
    Firefox浏览器控件安装方法
    通达OA整合教程
  • 原文地址:https://www.cnblogs.com/zhenyuyaodidiao/p/5494569.html
Copyright © 2011-2022 走看看