{"id":524,"date":"2020-10-05T18:09:50","date_gmt":"2020-10-05T10:09:50","guid":{"rendered":"https:\/\/harson.co\/?p=524"},"modified":"2020-12-03T21:04:21","modified_gmt":"2020-12-03T13:04:21","slug":"setup-forward-server","status":"publish","type":"post","link":"https:\/\/harson.co\/index.php\/2020\/10\/05\/setup-forward-server\/","title":{"rendered":"SetUp Forward Server"},"content":{"rendered":"<h1>Nginx<\/h1>\n<pre class=\"pure-highlightjs\"><code class=\"\">http:\/\/nginx.org\/en\/download.html<\/code><\/pre>\n<p>Debian9\u4e0b\u7f16\u8bd1\u73af\u5883<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">apt install gcc libpcre3 libpcre3-dev openssl libssl-dev zlib1g-dev zlib1g automake autoconf libtool make net-tools unzip<\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">.\/configure --with-stream\r\nmake\r\nmake install<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p><strong>nginx.conf<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">worker_processes  1;\r\nevents {\r\n    worker_connections  1024;\r\n}\r\nstream {\r\n    #\u5c0612345\u7aef\u53e3\u8f6c\u53d1\u5230192.168.1.23\u76843306\u7aef\u53e3\r\n    server {\r\n        listen 12345;\r\n        proxy_connect_timeout 5s;\r\n        proxy_timeout 20s;\r\n        proxy_pass 192.168.1.23:3306;\r\n    }\r\n    #\u5c06udp 53\u7aef\u53e3\u8f6c\u53d1\u5230192.168.1.23 53\u7aef\u53e3\r\n    server {\r\n        listen 53 udp reuseport;\r\n        proxy_timeout 20s;\r\n        proxy_pass 192.168.1.23:53;\r\n    }\r\n    #ipv4\u8f6c\u53d1\u5230ipv6\r\n    server {\r\n        listen 9135;\r\n        proxy_connect_timeout 10s;\r\n        proxy_timeout 30s;\r\n        proxy_pass [2607:fcd0:107:3cc::1]:9135;\r\n    }\r\n}<\/code><\/pre>\n<p>apt\u67e5\u770b\u6307\u5b9a\u8f6f\u4ef6\u7248\u672c<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">apt-cache madison shadowsocks-libev<\/code><\/pre>\n<p><strong>ss.conf<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">{\r\n    \"server\": \"ip\",\r\n    \"server_port\": 8888,\r\n    \"password\": \"pwd\",\r\n    \"method\": \"aes-256-gcm\",\r\n    \"timeout\": 10,\r\n    \"local_address\": \"127.0.0.1\",\r\n    \"local_port\":10844,\r\n}<\/code><\/pre>\n<p><strong>ss_server.conf<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">{\r\n    \"server\":\"127.0.0.1\",\r\n    \"server_port\":10844,\r\n    \"local_port\":10844,\r\n    \"password\":\"1234567.\",\r\n    \"timeout\":300,\r\n    \"method\":\"aes-256-gcm\",\r\n    \"mode\": \"tcp_and_udp\",\r\n    \"workers\": 1,\r\n}\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>About SS<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\">https:\/\/wiki.archlinux.org\/index.php\/Shadowsocks<\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx http:\/\/nginx.org\/en\/download.html Debian9\u4e0b\u7f16\u8bd1\u73af\u5883 ap [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-524","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/posts\/524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/comments?post=524"}],"version-history":[{"count":4,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/posts\/524\/revisions"}],"predecessor-version":[{"id":547,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/posts\/524\/revisions\/547"}],"wp:attachment":[{"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/media?parent=524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/categories?post=524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harson.co\/index.php\/wp-json\/wp\/v2\/tags?post=524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}