Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
a9d5918ffa
@ -1,6 +1,6 @@
|
|||||||
# frp
|
# frp
|
||||||
|
|
||||||
[](https://travis-ci.org/fatedier/frp)
|
[](https://circleci.com/gh/fatedier/frp)
|
||||||
[](https://github.com/fatedier/frp/releases)
|
[](https://github.com/fatedier/frp/releases)
|
||||||
|
|
||||||
[README](README.md) | [中文文档](README_zh.md)
|
[README](README.md) | [中文文档](README_zh.md)
|
||||||
|
@ -1,3 +1 @@
|
|||||||
### New
|
### New
|
||||||
|
|
||||||
* Command line parameters support `enable_prometheus`.
|
|
||||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
1
assets/frps/static/css/app.808290ae.css
Normal file
1
assets/frps/static/css/app.808290ae.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
.el-form-item span{margin-left:15px}.demo-table-expand{font-size:0}.demo-table-expand label{width:90px;color:#99a9bf}.demo-table-expand .el-form-item{margin-right:0;margin-bottom:0;width:50%}body{background-color:#fafafa;margin:0;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,sans-serif}header{width:100%;height:60px}.header-color{background:#58b7ff}#content{margin-top:20px;padding-right:40px}.brand{color:#fff;background-color:transparent;margin-left:20px;float:left;line-height:25px;font-size:25px;padding:15px 15px;height:30px;text-decoration:none}.source{border:1px solid #eaeefb;border-radius:4px;transition:.2s;padding:24px}.server_info{margin-left:40px;font-size:0}.server_info label{width:150px;color:#99a9bf}.server_info .el-form-item{margin-right:0;margin-bottom:0;width:100%}
|
1
assets/frps/static/css/chunk-vendors.84bb20f7.css
Normal file
1
assets/frps/static/css/chunk-vendors.84bb20f7.css
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/frps/static/fonts/element-icons.535877f5.woff
Normal file
BIN
assets/frps/static/fonts/element-icons.535877f5.woff
Normal file
Binary file not shown.
BIN
assets/frps/static/fonts/element-icons.732389de.ttf
Normal file
BIN
assets/frps/static/fonts/element-icons.732389de.ttf
Normal file
Binary file not shown.
@ -1 +1 @@
|
|||||||
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <title>frps dashboard</title> <link rel="shortcut icon" href="favicon.ico"></head> <body> <div id=app></div> <script type="text/javascript" src="manifest.js?14bea8276eef86cc7c61"></script><script type="text/javascript" src="vendor.js?51925ec1a77936b64d61"></script></body> </html>
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>frps-dashboard</title><link href="css/app.808290ae.css" rel="preload" as="style"><link href="css/chunk-vendors.84bb20f7.css" rel="preload" as="style"><link href="js/app.bb942a48.js" rel="preload" as="script"><link href="js/chunk-vendors.4421b07d.js" rel="preload" as="script"><link href="css/chunk-vendors.84bb20f7.css" rel="stylesheet"><link href="css/app.808290ae.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but frps-dashboard doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.4421b07d.js"></script><script src="js/app.bb942a48.js"></script></body></html>
|
2
assets/frps/static/js/app.bb942a48.js
Normal file
2
assets/frps/static/js/app.bb942a48.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/frps/static/js/app.bb942a48.js.map
Normal file
1
assets/frps/static/js/app.bb942a48.js.map
Normal file
File diff suppressed because one or more lines are too long
34
assets/frps/static/js/chunk-vendors.4421b07d.js
Normal file
34
assets/frps/static/js/chunk-vendors.4421b07d.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/frps/static/js/chunk-vendors.4421b07d.js.map
Normal file
1
assets/frps/static/js/chunk-vendors.4421b07d.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var i,a,f,l=0,s=[];l<t.length;l++)a=t[l],o[a]&&s.push(o[a][0]),o[a]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(r&&r(t,c,u);s.length;)s.shift()();if(u)for(l=0;l<u.length;l++)f=n(n.s=u[l]);return f};var t={},o={1:0};n.e=function(e){function r(){i.onerror=i.onload=null,clearTimeout(a);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var u=document.getElementsByTagName("head")[0],i=document.createElement("script");i.type="text/javascript",i.charset="utf-8",i.async=!0,i.timeout=12e4,n.nc&&i.setAttribute("nonce",n.nc),i.src=n.p+""+e+".js?"+{0:"51925ec1a77936b64d61"}[e];var a=setTimeout(r,12e4);return i.onerror=i.onload=r,u.appendChild(i),c},n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n.oe=function(e){throw console.error(e),e}}([]);
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -105,6 +105,7 @@ var rootCmd = &cobra.Command{
|
|||||||
var cfg config.ServerCommonConf
|
var cfg config.ServerCommonConf
|
||||||
var err error
|
var err error
|
||||||
if cfgFile != "" {
|
if cfgFile != "" {
|
||||||
|
log.Info("frps uses config file: %s", cfgFile)
|
||||||
var content string
|
var content string
|
||||||
content, err = config.GetRenderedConfFromFile(cfgFile)
|
content, err = config.GetRenderedConfFromFile(cfgFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -112,6 +113,7 @@ var rootCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
cfg, err = parseServerCommonCfg(CfgFileTypeIni, content)
|
cfg, err = parseServerCommonCfg(CfgFileTypeIni, content)
|
||||||
} else {
|
} else {
|
||||||
|
log.Info("frps uses command line arguments for config")
|
||||||
cfg, err = parseServerCommonCfg(CfgFileTypeCmd, "")
|
cfg, err = parseServerCommonCfg(CfgFileTypeCmd, "")
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -212,7 +214,7 @@ func runServer(cfg config.ServerCommonConf) (err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
log.Info("start frps success")
|
log.Info("frps started successfully")
|
||||||
svr.Run()
|
svr.Run()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -209,9 +209,10 @@ path = /handler
|
|||||||
ops = NewProxy
|
ops = NewProxy
|
||||||
```
|
```
|
||||||
|
|
||||||
addr: the address where the external RPC service listens on.
|
- addr: the address where the external RPC service listens. Defaults to http. For https, specify the schema: `addr = https://127.0.0.1:9001`.
|
||||||
path: http request url path for the POST request.
|
- path: http request url path for the POST request.
|
||||||
ops: operations plugin needs to handle (e.g. "Login", "NewProxy", ...).
|
- ops: operations plugin needs to handle (e.g. "Login", "NewProxy", ...).
|
||||||
|
- tls_verify: When the schema is https, we verify by default. Set this value to false if you want to skip verification.
|
||||||
|
|
||||||
### Metadata
|
### Metadata
|
||||||
|
|
||||||
|
@ -458,11 +458,16 @@ func UnmarshalPluginsFromIni(sections ini.File, cfg *ServerCommonConf) {
|
|||||||
for name, section := range sections {
|
for name, section := range sections {
|
||||||
if strings.HasPrefix(name, "plugin.") {
|
if strings.HasPrefix(name, "plugin.") {
|
||||||
name = strings.TrimSpace(strings.TrimPrefix(name, "plugin."))
|
name = strings.TrimSpace(strings.TrimPrefix(name, "plugin."))
|
||||||
|
var tls_verify, err = strconv.ParseBool(section["tls_verify"])
|
||||||
|
if err != nil {
|
||||||
|
tls_verify = true
|
||||||
|
}
|
||||||
options := plugin.HTTPPluginOptions{
|
options := plugin.HTTPPluginOptions{
|
||||||
Name: name,
|
Name: name,
|
||||||
Addr: section["addr"],
|
Addr: section["addr"],
|
||||||
Path: section["path"],
|
Path: section["path"],
|
||||||
Ops: strings.Split(section["ops"], ","),
|
Ops: strings.Split(section["ops"], ","),
|
||||||
|
TLSVerify: tls_verify,
|
||||||
}
|
}
|
||||||
for i := range options.Ops {
|
for i := range options.Ops {
|
||||||
options.Ops[i] = strings.TrimSpace(options.Ops[i])
|
options.Ops[i] = strings.TrimSpace(options.Ops[i])
|
||||||
|
@ -17,19 +17,22 @@ package plugin
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
"crypto/tls"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type HTTPPluginOptions struct {
|
type HTTPPluginOptions struct {
|
||||||
Name string
|
Name string
|
||||||
Addr string
|
Addr string
|
||||||
Path string
|
Path string
|
||||||
Ops []string
|
Ops []string
|
||||||
|
TLSVerify bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type httpPlugin struct {
|
type httpPlugin struct {
|
||||||
@ -40,10 +43,25 @@ type httpPlugin struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewHTTPPluginOptions(options HTTPPluginOptions) Plugin {
|
func NewHTTPPluginOptions(options HTTPPluginOptions) Plugin {
|
||||||
|
var url = fmt.Sprintf("%s%s", options.Addr, options.Path)
|
||||||
|
|
||||||
|
var client *http.Client
|
||||||
|
if strings.HasPrefix(url, "https://") {
|
||||||
|
tr := &http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: options.TLSVerify == false},
|
||||||
|
}
|
||||||
|
client = &http.Client{Transport: tr}
|
||||||
|
} else {
|
||||||
|
client = &http.Client{}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !strings.HasPrefix(url, "https://") && !strings.HasPrefix(url, "http://") {
|
||||||
|
url = "http://" + url
|
||||||
|
}
|
||||||
return &httpPlugin{
|
return &httpPlugin{
|
||||||
options: options,
|
options: options,
|
||||||
url: fmt.Sprintf("http://%s%s", options.Addr, options.Path),
|
url: url,
|
||||||
client: &http.Client{},
|
client: client,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"core-js": "^3.7.0",
|
||||||
"echarts": "^4.9.0",
|
"echarts": "^4.9.0",
|
||||||
"element-ui": "^2.14.1",
|
"element-ui": "^2.14.1",
|
||||||
"humanize-plus": "^1.8.2",
|
"humanize-plus": "^1.8.2",
|
||||||
"core-js": "^3.7.0",
|
|
||||||
"vue": "^2.6.12",
|
"vue": "^2.6.12",
|
||||||
"vue-router": "^3.4.9",
|
"vue-router": "^3.4.9",
|
||||||
"whatwg-fetch": "^3.5.0",
|
"vuex": "^3.5.1",
|
||||||
"vuex": "^3.5.1"
|
"whatwg-fetch": "^3.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "~4.5.9",
|
"@vue/cli-plugin-babel": "~4.5.9",
|
||||||
@ -32,10 +32,10 @@
|
|||||||
"eslint-plugin-promise": "^4.2.1",
|
"eslint-plugin-promise": "^4.2.1",
|
||||||
"eslint-plugin-standard": "^4.1.0",
|
"eslint-plugin-standard": "^4.1.0",
|
||||||
"eslint-plugin-vue": "^7.1.0",
|
"eslint-plugin-vue": "^7.1.0",
|
||||||
"node-sass": "^5.0.0",
|
|
||||||
"sass-loader": "^10.1.0",
|
|
||||||
"less": "^3.12.2",
|
"less": "^3.12.2",
|
||||||
"less-loader": "^7.1.0",
|
"less-loader": "^7.1.0",
|
||||||
|
"node-sass": "^5.0.0",
|
||||||
|
"sass-loader": "^10.1.0",
|
||||||
"vue-template-compiler": "^2.6.12"
|
"vue-template-compiler": "^2.6.12"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
|
13959
web/frps/yarn.lock
13959
web/frps/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user