Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snail007 committed Apr 5, 2020
1 parent 1f5c3fc commit 667bd34
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,8 @@ When the UDP upstream proxies (parameter: -T) is udp, it supports the specified
### 3.7 Help
`proxy help udp`

## 4. Internet NAT
## 4. Expose Intranet

### 4.1 principle description
Intranet penetration, divided into two versions, "multi-link version" and "multiplexed version", generally like a web service, this service is not a long-term connection, it is recommended to use "multi-link version", if it is to keep long The time connection suggests using a "multiplexed version."
1. Multi-link version, the corresponding sub-command is tserver, tclient, tbridge.
Expand Down Expand Up @@ -1004,11 +1005,9 @@ Socks5://host:port
Host: the IP or domain name of the proxy
Port: the port of the proxy

### 4.9. Intranet penetration HTTP service
### 4.9. Expose HTTP service

Usually the HTTP request client will use the server's ip and port to set the HOST field, but it is not the same as the expected backend actual HOST, which causes tcp to be passed.
However, the backend relies on the HOST field to locate the virtual host and it will not work. Now use the --http-host parameter to force the HOST field value of the http header to be the actual value of the backend.
Domain names and ports can be easily solved.
Usually the HTTP request client will use the server's ip and port to set the HOST field, but it is not the same as the expected backend actual HOST, which causes tcp to be passed.However, the backend relies on the HOST field to locate the virtual host and it will not work. Now use the `--http-host` parameter to force the HOST field value of the http header to be the actual value of the backend.Domain names and ports can be easily solved. After using the `--http-host` parameter, two headers will be added to the header of each HTTP request. The `X-Forwarded-For` and `X-Real-IP` values ​​are the client IP, so the backend http service can easily obtain the real IP address of the client.

The format of the `server`-http-host parameter is as follows:

Expand Down
7 changes: 4 additions & 3 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,7 @@ port:代理的端口

### 4.9.内网穿透HTTP服务

通常HTTP请求客户端会使用server的ip和端口去设置HOST字段,但是与期望的后端实际HOST不一样,这样就造成了tcp是通的,
但后端依赖HOST字段定位虚拟主机就不能工作.现在用--http-host参数强制设置http头部的HOST字段值为后端实际的
域名和端口即可轻松解决。
通常HTTP请求客户端会使用server的ip和端口去设置HOST字段,但是与期望的后端实际HOST不一样,这样就造成了tcp是通的, 但后端依赖HOST字段定位虚拟主机就不能工作.现在用`--http-host`参数强制设置http头部的HOST字段值为后端实际的域名和端口即可轻松解决,另外使用了`--http-host`参数之后,会在每个HTTP请求的头部增加两个头部 `X-Forwarded-For``X-Real-IP` 值是客户端IP, 这样后端http服务就能方便的获取用户端真实IP地址。

`server`的--http-host参数格式如下:

Expand All @@ -1007,6 +1005,9 @@ port:代理的端口

当使用http协议请求server的ip:2500端口的时候,http的头部HOST字段就会被设置为`local.com`

另外只有设置了`--http-host`参数


### 4.10 关于流量统计

如果单独启动一个server对接上级是proxy-admin控制面板,需要在上级控制面板里面新建一个映射,获得个映射规则的ID,
Expand Down
9 changes: 4 additions & 5 deletions docs/manual/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,8 @@ When the UDP upstream proxies (parameter: -T) is udp, it supports the specified
### 3.7 Help
`proxy help udp`

## 4. Internet NAT
## 4. Expose Intranet

### 4.1 principle description
Intranet penetration, divided into two versions, "multi-link version" and "multiplexed version", generally like a web service, this service is not a long-term connection, it is recommended to use "multi-link version", if it is to keep long The time connection suggests using a "multiplexed version."
1. Multi-link version, the corresponding sub-command is tserver, tclient, tbridge.
Expand Down Expand Up @@ -836,11 +837,9 @@ Socks5://host:port
Host: the IP or domain name of the proxy
Port: the port of the proxy

### 4.9. Intranet penetration HTTP service
### 4.9. Expose HTTP service

Usually the HTTP request client will use the server's ip and port to set the HOST field, but it is not the same as the expected backend actual HOST, which causes tcp to be passed.
However, the backend relies on the HOST field to locate the virtual host and it will not work. Now use the --http-host parameter to force the HOST field value of the http header to be the actual value of the backend.
Domain names and ports can be easily solved.
Usually the HTTP request client will use the server's ip and port to set the HOST field, but it is not the same as the expected backend actual HOST, which causes tcp to be passed.However, the backend relies on the HOST field to locate the virtual host and it will not work. Now use the `--http-host` parameter to force the HOST field value of the http header to be the actual value of the backend.Domain names and ports can be easily solved. After using the `--http-host` parameter, two headers will be added to the header of each HTTP request. The `X-Forwarded-For` and `X-Real-IP` values ​​are the client IP, so the backend http service can easily obtain the real IP address of the client.

The format of the `server`-http-host parameter is as follows:

Expand Down
7 changes: 4 additions & 3 deletions docs/manual/zh/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,7 @@ port:代理的端口

### 4.9.内网穿透HTTP服务

通常HTTP请求客户端会使用server的ip和端口去设置HOST字段,但是与期望的后端实际HOST不一样,这样就造成了tcp是通的,
但后端依赖HOST字段定位虚拟主机就不能工作.现在用--http-host参数强制设置http头部的HOST字段值为后端实际的
域名和端口即可轻松解决。
通常HTTP请求客户端会使用server的ip和端口去设置HOST字段,但是与期望的后端实际HOST不一样,这样就造成了tcp是通的, 但后端依赖HOST字段定位虚拟主机就不能工作.现在用`--http-host`参数强制设置http头部的HOST字段值为后端实际的域名和端口即可轻松解决,另外使用了`--http-host`参数之后,会在每个HTTP请求的头部增加两个头部 `X-Forwarded-For``X-Real-IP` 值是客户端IP, 这样后端http服务就能方便的获取用户端真实IP地址。

`server`的--http-host参数格式如下:

Expand All @@ -843,6 +841,9 @@ port:代理的端口

当使用http协议请求server的ip:2500端口的时候,http的头部HOST字段就会被设置为`local.com`

另外只有设置了`--http-host`参数


### 4.10 关于流量统计

如果单独启动一个server对接上级是proxy-admin控制面板,需要在上级控制面板里面新建一个映射,获得个映射规则的ID,
Expand Down
10 changes: 5 additions & 5 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@
</url>

<url>
<loc>https://snail007.github.io/goproxy/tags/cdn/</loc>
<loc>https://snail007.github.io/goproxy/categories/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>

<url>
<loc>https://snail007.github.io/goproxy/categories/</loc>
<loc>https://snail007.github.io/goproxy/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>

<url>
<loc>https://snail007.github.io/goproxy/</loc>
<loc>https://snail007.github.io/goproxy/posts/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>

<url>
<loc>https://snail007.github.io/goproxy/posts/</loc>
<loc>https://snail007.github.io/goproxy/tags/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>

<url>
<loc>https://snail007.github.io/goproxy/tags/</loc>
<loc>https://snail007.github.io/goproxy/tags/cdn/</loc>
<lastmod>2019-07-05T08:20:48+08:00</lastmod>
<priority>0</priority>
</url>
Expand Down
4 changes: 2 additions & 2 deletions docs/tags/cdn/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/solarized_dark.min.css">
<title>CDN - GOPROXY IN ACTION</title>
<title>cdn - GOPROXY IN ACTION</title>

<link href="https://snail007.github.io/goproxy/css/styles.css" rel="stylesheet">

Expand Down Expand Up @@ -77,7 +77,7 @@


<header class="page-header">
<h1>CDN</h1>
<h1>cdn</h1>
</header>


Expand Down
4 changes: 2 additions & 2 deletions docs/tags/cdn/index.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>CDN on GOPROXY IN ACTION</title>
<title>cdn on GOPROXY IN ACTION</title>
<link>https://snail007.github.io/goproxy/tags/cdn/</link>
<description>Recent content in CDN on GOPROXY IN ACTION</description>
<description>Recent content in cdn on GOPROXY IN ACTION</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh-CN</language>
<lastBuildDate>Fri, 05 Jul 2019 08:20:48 +0800</lastBuildDate>
Expand Down
2 changes: 1 addition & 1 deletion docs/tags/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


<item>
<title>CDN</title>
<title>cdn</title>
<link>https://snail007.github.io/goproxy/tags/cdn/</link>
<pubDate>Fri, 05 Jul 2019 08:20:48 +0800</pubDate>

Expand Down

0 comments on commit 667bd34

Please sign in to comment.