Merge pull request #3714 from fatedier/dev

bump version
This commit is contained in:
fatedier 2023-10-23 10:51:50 +08:00 committed by GitHub
commit c9ca9353cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 43 additions and 56 deletions

View File

@ -91,8 +91,6 @@ We will transition from version 0 to version 1 at the appropriate time and will
### About V2
The overall situation is currently unfavorable, and there is significant pressure in both personal and professional aspects.
The complexity and difficulty of the v2 version are much higher than anticipated. I can only work on its development during fragmented time periods, and the constant interruptions disrupt productivity significantly. Given this situation, we will continue to optimize and iterate on the current version until we have more free time to proceed with the major version overhaul.
The concept behind v2 is based on my years of experience and reflection in the cloud-native domain, particularly in K8s and ServiceMesh. Its core is a modernized four-layer and seven-layer proxy, similar to envoy. This proxy itself is highly scalable, not only capable of implementing the functionality of intranet penetration but also applicable to various other domains. Building upon this highly scalable core, we aim to implement all the capabilities of frp v1 while also addressing the functionalities that were previously unachievable or difficult to implement in an elegant manner. Furthermore, we will maintain efficient development and iteration capabilities.
@ -218,7 +216,7 @@ Unfortunately, we cannot resolve a domain name to a local IP. However, we can us
vhostHTTPPort = 8080
```
If you want to configure an https proxy, you need to set up the `vhost_https_port`.
If you want to configure an https proxy, you need to set up the `vhostHTTPSPort`.
2. Start `frps`:
@ -337,7 +335,7 @@ Configure `frps` as described above, then:
### Enable HTTPS for a local HTTP(S) service
You may substitute `https2https` for the plugin, and point the `plugin_local_addr` to a HTTPS endpoint.
You may substitute `https2https` for the plugin, and point the `localAddr` to a HTTPS endpoint.
1. Start `frpc` with the following configuration:
@ -369,7 +367,7 @@ To mitigate risks associated with exposing certain services directly to the publ
Configure `frps` same as above.
1. Start `frpc` on machine B with the following config. This example is for exposing the SSH service (port 22), and note the `sk` field for the preshared key, and that the `remote_port` field is removed here:
1. Start `frpc` on machine B with the following config. This example is for exposing the SSH service (port 22), and note the `secretKey` field for the preshared key, and that the `remotePort` field is removed here:
```toml
# frpc.toml
@ -384,7 +382,7 @@ Configure `frps` same as above.
localPort = 22
```
2. Start another `frpc` (typically on another machine C) with the following config to access the SSH service with a security key (`sk` field):
2. Start another `frpc` (typically on another machine C) with the following config to access the SSH service with a security key (`secretKey` field):
```toml
# frpc.toml
@ -526,7 +524,7 @@ webServer.user = "admin"
webServer.password = "admin"
```
Then visit `http://[server_addr]:7500` to see the dashboard, with username and password both being `admin`.
Then visit `http://[serverAddr]:7500` to see the dashboard, with username and password both being `admin`.
Additionally, you can use HTTPS port by using your domains wildcard or normal SSL certificate:
@ -539,7 +537,7 @@ webServer.tls.certFile = "server.crt"
webServer.tls.keyFile = "server.key"
```
Then visit `https://[server_addr]:7500` to see the dashboard in secure HTTPS connection, with username and password both being `admin`.
Then visit `https://[serverAddr]:7500` to see the dashboard in secure HTTPS connection, with username and password both being `admin`.
![dashboard](/doc/pic/dashboard.png)
@ -836,7 +834,7 @@ Using QUIC in frp:
quicBindPort = 7000
```
The `quicBindPort` number can be the same number as `bind_port`, since `bind_port` field specifies a TCP port.
The `quicBindPort` number can be the same number as `bindPort`, since `bindPort` field specifies a TCP port.
2. Configure `frpc.toml` to use QUIC to connect to frps:

View File

@ -41,9 +41,7 @@ master 分支用于发布稳定版本dev 分支用于开发,您可以尝试
### 关于 v2 的一些说明
当前整体形势不佳,面临的生活工作压力很大。
v2 版本的复杂度和难度比我们预期的要高得多。我只能利用零散的时间进行开发,而且由于上下文经常被打断,效率极低。由于这种情况可能会持续一段时间,我们仍然会在当前版本上进行一些优化和迭代,直到我们有更多空闲时间来推进大版本的重构。
v2 版本的复杂度和难度比我们预期的要高得多。我只能利用零散的时间进行开发,而且由于上下文经常被打断,效率极低。由于这种情况可能会持续一段时间,我们仍然会在当前版本上进行一些优化和迭代,直到我们有更多空闲时间来推进大版本的重构,或者也有可能放弃一次性的重构,而是采用渐进的方式在当前版本上逐步做一些可能会导致不兼容的修改。
v2 的构想是基于我多年在云原生领域,特别是在 K8s 和 ServiceMesh 方面的工作经验和思考。它的核心是一个现代化的四层和七层代理,类似于 envoy。这个代理本身高度可扩展不仅可以用于实现内网穿透的功能还可以应用于更多领域。在这个高度可扩展的内核基础上我们将实现 frp v1 中的所有功能,并且能够以一种更加优雅的方式实现原先架构中无法实现或不易实现的功能。同时,我们将保持高效的开发和迭代能力。
@ -55,7 +53,7 @@ v2 的构想是基于我多年在云原生领域,特别是在 K8s 和 ServiceM
## 文档
完整文档已经迁移至 [https://gofrp.org](https://gofrp.org/docs)。
完整文档已经迁移至 [https://gofrp.org](https://gofrp.org)。
## 为 frp 做贡献

View File

@ -1,6 +1,3 @@
### Fixes
* `transport.tls.disableCustomTLSFirstByte` doesn't have any effect.
* The Server API did not return the data correctly.
* The Dashboard is unable to display data.
* `natHoleStunServer` is missing a default value.
* Encryption and compression are not displayed correctly in the dashboard.

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<title>frps dashboard</title>
<script type="module" crossorigin src="./index-9465253b.js"></script>
<script type="module" crossorigin src="./index-c322b7dd.js"></script>
<link rel="stylesheet" href="./index-1e0c7400.css">
</head>

View File

@ -1,3 +1,5 @@
# This configuration file is for reference only. Please do not use this configuration directly to run the program as it may have various issues.
# your proxy name will be changed to {user}.{proxy}
user = "your_name"
@ -36,7 +38,7 @@ auth.token = "12345678"
# auth.oidc.clientSecret = ""
# oidc.audience specifies the audience of the token in OIDC authentication.
# auth.oidc.audience = ""
# oidc_scope specifies the permisssions of the token in OIDC authentication if AuthenticationMethod == "oidc". By default, this value is "".
# oidc.scope specifies the permisssions of the token in OIDC authentication if AuthenticationMethod == "oidc". By default, this value is "".
# auth.oidc.scope = ""
# oidc.tokenEndpointURL specifies the URL which implements OIDC Token Endpoint.
# It will be used to get an OIDC token.
@ -110,7 +112,7 @@ transport.tls.enable = true
# transport.tls.disableCustomTLSFirstByte = true
# Heartbeat configure, it's not recommended to modify the default value.
# The default value of heartbeat_interval is 10 and heartbeat_timeout is 90. Set negative value
# The default value of heartbeatInterval is 10 and heartbeatTimeout is 90. Set negative value
# to disable it.
# transport.heartbeatInterval = 30
# transport.heartbeatTimeout = 90
@ -173,7 +175,7 @@ name = "ssh_random"
type = "tcp"
localIP = "192.168.31.100"
localPort = 22
# If remote_port is 0, frps will assign a random port for you
# If remotePort is 0, frps will assign a random port for you
remotePort = 0
[[proxies]]
@ -183,14 +185,14 @@ localIP = "114.114.114.114"
localPort = 53
remotePort = 6002
# Resolve your domain names to [server_addr] so you can use http://web01.yourdomain.com to browse web01 and http://web02.yourdomain.com to browse web02
# Resolve your domain names to [serverAddr] so you can use http://web01.yourdomain.com to browse web01 and http://web02.yourdomain.com to browse web02
[[proxies]]
name = "web01"
type = "http"
localIP = "127.0.0.1"
localPort = 80
# http username and password are safety certification for http protocol
# if not set, you can access this custom_domains without certification
# if not set, you can access this customDomains without certification
httpUser = "admin"
httpPassword = "admin"
# if domain for frps is frps.com, then you can access [web01] proxy by URL http://web01.frps.com
@ -199,9 +201,8 @@ customDomains = ["web01.yourdomain.com"]
# locations is only available for http type
locations = ["/", "/pic"]
# route requests to this service if http basic auto user is abc
# route_by_http_user = abc
# routeByHTTPUser = abc
hostHeaderRewrite = "example.com"
# params with prefix "header_" will be used to update http request headers
requestHeaders.set.x-from-where = "frp"
healthCheck.type = "http"
# frpc will send a GET http request '/status' to local http service
@ -235,7 +236,7 @@ customDomains = ["tunnel1"]
name = "plugin_unix_domain_socket"
type = "tcp"
remotePort = 6003
# if plugin is defined, local_ip and local_port is useless
# if plugin is defined, localIP and localPort is useless
# plugin will handle connections got from frps
[proxies.plugin]
type = "unix_domain_socket"
@ -306,7 +307,7 @@ requestHeaders.set.x-from-where = "frp"
[[proxies]]
name = "secret_tcp"
# If the type is secret tcp, remote_port is useless
# If the type is secret tcp, remotePort is useless
# Who want to connect local port should deploy another frpc with stcp proxy and role is visitor
type = "stcp"
# secretKey is used for authentication for visitors
@ -353,7 +354,7 @@ bindAddr = "127.0.0.1"
bindPort = 9001
# when automatic tunnel persistence is required, set it to true
keepTunnelOpen = false
# effective when keep_tunnel_open is set to true, the number of attempts to punch through per hour
# effective when keepTunnelOpen is set to true, the number of attempts to punch through per hour
maxRetriesAnHour = 8
minRetryInterval = 90
# fallbackTo = "stcp_visitor"

View File

@ -1,10 +1,12 @@
# This configuration file is for reference only. Please do not use this configuration directly to run the program as it may have various issues.
# A literal address or host name for IPv6 must be enclosed
# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
# For single "bind_addr" field, no need square brackets, like "bind_addr = ::".
# For single "bindAddr" field, no need square brackets, like `bindAddr = "::"`.
bindAddr = "0.0.0.0"
bindPort = 7000
# udp port used for kcp protocol, it can be same with 'bind_port'.
# udp port used for kcp protocol, it can be same with 'bindPort'.
# if not set, kcp is disabled in frps.
kcpBindPort = 7000
@ -12,8 +14,8 @@ kcpBindPort = 7000
# if not set, quic is disabled in frps.
# quicBindPort = 7002
# Specify which address proxy will listen for, default value is same with bind_addr
# proxy_bind_addr = "127.0.0.1"
# Specify which address proxy will listen for, default value is same with bindAddr
# proxyBindAddr = "127.0.0.1"
# quic protocol options
# transport.quic.keepalivePeriod = 10
@ -21,7 +23,7 @@ kcpBindPort = 7000
# transport.quic.maxIncomingStreams = 100000
# Heartbeat configure, it's not recommended to modify the default value
# The default value of heartbeat_timeout is 90. Set negative value to disable it.
# The default value of heartbeatTimeout is 90. Set negative value to disable it.
# transport.heartbeatTimeout = 90
# Pool count in each proxy will keep no more than maxPoolCount.
@ -46,7 +48,7 @@ tls.force = false
# transport.tls.trustedCaFile = "ca.crt"
# If you want to support virtual host, you must set the http port for listening (optional)
# Note: http port and https port can be same with bind_port
# Note: http port and https port can be same with bindPort
vhostHTTPPort = 80
vhostHTTPSPort = 443
@ -59,7 +61,7 @@ vhostHTTPSPort = 443
# HTTP CONNECT requests. By default, this value is 0.
# tcpmuxHTTPConnectPort = 1337
# If tcpmux_passthrough is true, frps won't do any update on traffic.
# If tcpmuxPassthrough is true, frps won't do any update on traffic.
# tcpmuxPassthrough = false
# Configure the web server to enable the dashboard for frps.

View File

@ -46,8 +46,6 @@ for os in $os_all; do
mv ./frps_${os}_${arch} ${frp_path}/frps
fi
cp ../LICENSE ${frp_path}
cp -rf ../conf/* ${frp_path}
rm -rf ${frp_path}/legacy
# packages
cd ./packages

View File

@ -150,6 +150,7 @@ type ServerTransportConfig struct {
// TCPMux toggles TCP stream multiplexing. This allows multiple requests
// from a client to share a single TCP connection. By default, this value
// is true.
// $HideFromDoc
TCPMux *bool `json:"tcpMux,omitempty"`
// TCPMuxKeepaliveInterval specifies the keep alive interval for TCP stream multipler.
// If TCPMux is true, heartbeat of application layer is unnecessary because it can only rely on heartbeat in TCPMux.

View File

@ -19,7 +19,7 @@ import (
"strings"
)
var version = "0.52.1"
var version = "0.52.2"
func Full() string {
return version

View File

@ -23,12 +23,8 @@ class BaseProxy {
this.type = ''
this.encryption = false
this.compression = false
if (proxyStats.conf != null && proxyStats.conf.useEncryption != null) {
this.encryption = proxyStats.conf.useEncryption
}
if (proxyStats.conf != null && proxyStats.conf.useCompression != null) {
this.compression = proxyStats.conf.useCompression
}
this.encryption = (proxyStats.conf?.transport?.useEncryption) || this.encryption;
this.compression = (proxyStats.conf?.transport?.useCompression) || this.compression;
this.conns = proxyStats.curConns
this.trafficIn = proxyStats.todayTrafficIn
this.trafficOut = proxyStats.todayTrafficOut
@ -79,14 +75,12 @@ class HTTPProxy extends BaseProxy {
super(proxyStats)
this.type = 'http'
this.port = port
if (proxyStats.conf != null) {
if (proxyStats.conf.customDomains != null) {
this.customDomains = proxyStats.conf.customDomains
}
if (proxyStats.conf) {
this.customDomains = proxyStats.conf.customDomains || this.customDomains;
this.hostHeaderRewrite = proxyStats.conf.hostHeaderRewrite
this.locations = proxyStats.conf.locations
if (proxyStats.conf.subdomain != null && proxyStats.conf.subdomain != '') {
this.subdomain = proxyStats.conf.subdomain + '.' + subdomainHost
if (proxyStats.conf.subdomain) {
this.subdomain = `${proxyStats.conf.subdomain}.${subdomainHost}`
}
}
}
@ -98,11 +92,9 @@ class HTTPSProxy extends BaseProxy {
this.type = 'https'
this.port = port
if (proxyStats.conf != null) {
if (proxyStats.conf.customDomains != null) {
this.customDomains = proxyStats.conf.customDomains
}
if (proxyStats.conf.subdomain != null && proxyStats.conf.subdomain != '') {
this.subdomain = proxyStats.conf.subdomain + '.' + subdomainHost
this.customDomains = proxyStats.conf.customDomains || this.customDomains;
if (proxyStats.conf.subdomain) {
this.subdomain = `${proxyStats.conf.subdomain}.${subdomainHost}`
}
}
}