Browse Source

Support reverseproxy to dashboard with additional parts in path (#2289)

/api/ -> ../api/   in vendor.js
    Support reverseproxy to dashboard with addtional parts in path.
pull/2323/head
YK-Samgo 4 years ago committed by GitHub
parent
commit
bed13d7ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      assets/frps/static/index.html
  2. 2
      assets/frps/static/manifest.js
  3. 2
      assets/frps/static/vendor.js
  4. 4
      assets/frps/statik/statik.go
  5. 2
      web/frps/src/components/Overview.vue
  6. 4
      web/frps/src/components/ProxiesHttp.vue
  7. 4
      web/frps/src/components/ProxiesHttps.vue
  8. 2
      web/frps/src/components/ProxiesStcp.vue
  9. 2
      web/frps/src/components/ProxiesTcp.vue
  10. 2
      web/frps/src/components/ProxiesUdp.vue
  11. 2
      web/frps/src/components/Traffic.vue

2
assets/frps/static/index.html

@ -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?b8b55d8156200869417b"></script><script type="text/javascript" src="vendor.js?3e078a9d741093b909de"></script></body> </html> <!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?6de757d11d8d32c5edfd"></script><script type="text/javascript" src="vendor.js?d0b2c2fed55cf75bdefe"></script></body> </html>

2
assets/frps/static/manifest.js

@ -1 +1 @@
!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,u,c){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 u)Object.prototype.hasOwnProperty.call(u,i)&&(e[i]=u[i]);for(r&&r(t,u,c);s.length;)s.shift()();if(c)for(l=0;l<c.length;l++)f=n(n.s=c[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 u=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=u;var c=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:"3e078a9d741093b909de"}[e];var a=setTimeout(r,12e4);return i.onerror=i.onload=r,c.appendChild(i),u},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}}([]); !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:"d0b2c2fed55cf75bdefe"}[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}}([]);

2
assets/frps/static/vendor.js

File diff suppressed because one or more lines are too long

4
assets/frps/statik/statik.go

File diff suppressed because one or more lines are too long

2
web/frps/src/components/Overview.vue

@ -78,7 +78,7 @@
}, },
methods: { methods: {
fetchData() { fetchData() {
fetch('/api/serverinfo', {credentials: 'include'}) fetch('../api/serverinfo', {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()
}).then(json => { }).then(json => {

4
web/frps/src/components/ProxiesHttp.vue

@ -116,7 +116,7 @@
return Humanize.fileSize(row.traffic_out) return Humanize.fileSize(row.traffic_out)
}, },
fetchData() { fetchData() {
fetch('/api/serverinfo', {credentials: 'include'}) fetch('../api/serverinfo', {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()
}).then(json => { }).then(json => {
@ -125,7 +125,7 @@
if (this.vhost_http_port == null || this.vhost_http_port == 0) { if (this.vhost_http_port == null || this.vhost_http_port == 0) {
return return
} else { } else {
fetch('/api/proxy/http', {credentials: 'include'}) fetch('../api/proxy/http', {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()
}).then(json => { }).then(json => {

4
web/frps/src/components/ProxiesHttps.vue

@ -111,7 +111,7 @@
return Humanize.fileSize(row.traffic_out) return Humanize.fileSize(row.traffic_out)
}, },
fetchData() { fetchData() {
fetch('/api/serverinfo', {credentials: 'include'}) fetch('../api/serverinfo', {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()
}).then(json => { }).then(json => {
@ -120,7 +120,7 @@
if (this.vhost_https_port == null || this.vhost_https_port == 0) { if (this.vhost_https_port == null || this.vhost_https_port == 0) {
return return
} else { } else {
fetch('/api/proxy/https', {credentials: 'include'}) fetch('../api/proxy/https', {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()
}).then(json => { }).then(json => {

2
web/frps/src/components/ProxiesStcp.vue

@ -95,7 +95,7 @@
return Humanize.fileSize(row.traffic_out) return Humanize.fileSize(row.traffic_out)
}, },
fetchData() { fetchData() {
fetch('/api/proxy/stcp', {credentials: 'include'}) fetch('../api/proxy/stcp', {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()
}).then(json => { }).then(json => {

2
web/frps/src/components/ProxiesTcp.vue

@ -103,7 +103,7 @@
return Humanize.fileSize(row.traffic_out) return Humanize.fileSize(row.traffic_out)
}, },
fetchData() { fetchData() {
fetch('/api/proxy/tcp', {credentials: 'include'}) fetch('../api/proxy/tcp', {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()
}).then(json => { }).then(json => {

2
web/frps/src/components/ProxiesUdp.vue

@ -105,7 +105,7 @@
return Humanize.fileSize(row.traffic_out) return Humanize.fileSize(row.traffic_out)
}, },
fetchData() { fetchData() {
fetch('/api/proxy/udp', {credentials: 'include'}) fetch('../api/proxy/udp', {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()
}).then(json => { }).then(json => {

2
web/frps/src/components/Traffic.vue

@ -14,7 +14,7 @@ export default {
//}, //},
methods: { methods: {
fetchData() { fetchData() {
let url = '/api/traffic/' + this.proxy_name let url = '../api/traffic/' + this.proxy_name
fetch(url, {credentials: 'include'}) fetch(url, {credentials: 'include'})
.then(res => { .then(res => {
return res.json() return res.json()

Loading…
Cancel
Save