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 = ;
ip = 127.0.0.1;
port = ;
type = socks5;
}

3、启动/停止

启动
[root@localhost ~]# nohup /usr/local/bin/redsocks -c /etc/redsocks.conf &
停止
[root@localhost ~]# kill - 对应进程

Centos7下安装配置Redsocks的更多相关文章

  1. Centos7 下安装配置tomcat7

    首先下载压缩包 wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-7/v7.0.78/bin/apache-tomcat-7. ...

  2. centos7下安装配置prometheus

    prometheus官网:https://prometheus.io/download/ 搭建环境参考:https://blog.csdn.net/baidu_36943075/article/det ...

  3. centos7下安装配置jenkins+git+maven+jdk

    环境 centos7 jdk1.8 maven3 git 在安装jenkins之前,先安装jdk1.8.maven.git 一. 安装jdk1.8 第一步:下载 jdk-8u131-linux-x64 ...

  4. CentOS7下安装配置vncserver

    之前试了xmanager,不过好像和在centos6有很大不同,居然没成功,然后找到了vncserver,试了下,成了 参考:http://blog.csdn.net/jiangliqing1234/ ...

  5. Linux centos7下安装配置redis及Redis desktop Manager工具连接注意事项

    基本工具:VMware12.CentOS-7-x86_64-Everything-1611.iso.redis-desktop-manager-0.8.0.3841 废话不多说,首先,关于什么是Red ...

  6. Centos7下安装配置elasticsearch 6.3.1

    1)下载 Elasticsearch 6.3.1 地址:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.1 ...

  7. centos7下安装配置redis3.0.4

    安装redis 1.进入redis官网(redis.io)下载redis稳定版安装包,目前稳定版本为3.0.4 2.在linux  /usr文件夹下新建redis文件夹,拷贝安装包redis-3.0. ...

  8. CentOS7下安装配置Nginx

    一:安装依赖项 1.pcre:2.openssl:3.zlib:4.gcc:可直接通过yum安装 二:创建nginx账户(可以配置nginx.conf的user为此账户) useradd nginx ...

  9. centos7下安装配置redis

    1.1. Redis下载安装(linux) 1.1.1. 下载: 下载地址:https://redis.io/download 选择合适的版本下载,如下图: 1.1.2. 安装: (1)把下载好的re ...

随机推荐

  1. android-ImageView及其子类

    一.知识概要 ImageView继承自View,能显示任何Drawable对象; ImageView支持的常用XML属性及相关方法: android:adjustViewBounds    设置Ima ...

  2. Effective STL(第7条)

    第7条:如果容器中包含了通过new操作创建的指针,切忌在容器对象析构前将指针delete掉 //向一个vector中添加多个new出来的对象 void doSomething(){ vector< ...

  3. 关于JS的算法

    一.快速排序 function qSort(arr) { if(arr.length === 0) { return []; } var left = []; var right = []; var ...

  4. Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds 解决方法

    Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds. If the server requires ...

  5. PHP filesystem attack vectors

    http://www.ush.it/2009/02/08/php-filesystem-attack-vectors/ On Apr 07, 2008 I spoke with Kuza55 and ...

  6. matplotlib 安装与使用

    1.在ubuntu下输入 sudo apt-get install python-matplotlib 安装matplotlib 2.简单代码使用

  7. php课程---文件操作及文件上传的代码总结

    php里面文件包含目录和文件两种 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "h ...

  8. 内省操作javabean的属性

    import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector ...

  9. c#根据后台数据,自动生成checkbox

    前端在aspx中,添加生成checkbox的容器div: <div id="container" runat="server"></div&g ...

  10. 总结-swing、JFrame、JScrollPane、JTabbedPane、JEditorPane

    总结-swing.JFrame.JButton.JScrollPane.JLabel.JTabbedPane.JEditorPane 1.JButton内边距(去掉按钮里的空白):setMargin2 ...