iptablesを直接いじりたくないのでufwを導入します。
sudo yum install wget make
mkdir -p ~/src
cd ~/src
wget https://launchpad.net/ufw/0.33/0.33/+download/ufw-0.33.tar.gz
tar xzf ufw-0.33.tar.gz
cd ufw-0.33
sudo python ./setup.py install| (function (doc) { | |
| var origin_title = doc.title; | |
| setInterval(function() { | |
| doc.title = doc.title.length <= 15 | |
| ? origin_title | |
| : doc.title.slice(1, 1) + doc.title.slice(1, doc.title.length + 1); | |
| }, 300); | |
| })(document); |
| define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { | |
| "use strict"; | |
| var oop = require("../lib/oop"); | |
| var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; | |
| var SqlHighlightRules = function() { | |
| var keywords = ( | |
| "add|aggregate|all|alter|and|api_version|as|asc|avro|between|bigint|binary|boolean|by|cached|case|cast|change|char|class|close_fn|column|columns|comment|compute|create|cross|data|database|databases|date|"+ |
| <?php | |
| # Kafka configuration (https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md) | |
| $config = [ "metadata.broker.list" => "broker1.example.com", "socket.timeout.ms" => 30000, ... ]; | |
| # Create Kafka Producer object. | |
| # Brokers are specified through $config, but we could make it easier for people by having the first | |
| # argument be brokers as well, and rdkafka will use all brokers specified? | |
| $producer = new Kafka::Producer([$brokers,]? $config); |
| <?php | |
| route('GET', '/', function ($data) { | |
| echo 'Welcome!'; | |
| }); | |
| return false; | |
| function route($method, $uri, $callback) { | |
| $REQUEST_URI = explode('?', $_SERVER["REQUEST_URI"])[0]; | |
| import os | |
| import urlparse | |
| import tinycss | |
| import requests | |
| from bs4 import BeautifulSoup | |
| def crawl(site_url): | |
| html = get_source(site_url) | |
| soup = BeautifulSoup(html, 'html.parser') |
| def inbox | |
| @register = @inbox.shift | |
| end | |
| def outbox | |
| @outbox.push @register | |
| end | |
| def add(addr) | |
| @register = @register + @ram[addr] |
| function getWord(s) { | |
| var ascii = [], | |
| font = { | |
| // 0: | |
| // 1: * | |
| // 2: * | |
| // 3: ** | |
| // 4:* | |
| // 5:* * | |
| // 6:** |
| import requests | |
| from db import db | |
| """ | |
| The Douban Group API which not display on http://developers.douban.com/wiki/?title=api_v2 | |
| Base url: https://api.douban.com/v2 | |
| Group info: /group/:id |
iptablesを直接いじりたくないのでufwを導入します。
sudo yum install wget make
mkdir -p ~/src
cd ~/src
wget https://launchpad.net/ufw/0.33/0.33/+download/ufw-0.33.tar.gz
tar xzf ufw-0.33.tar.gz
cd ufw-0.33
sudo python ./setup.py install透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则
创建 /etc/ss-redir.json 本地监听 7777
运行ss-redir -v -c /etc/ss-redir.json
iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个