mirror of
https://github.com/fatedier/frp.git
synced 2025-05-09 16:18:27 +00:00
Compare commits
3 Commits
17d0fe4d1d
...
165bf88b36
Author | SHA1 | Date | |
---|---|---|---|
|
165bf88b36 | ||
|
cdfa8fa66f | ||
|
4991596dae |
@ -133,6 +133,7 @@ func (ctl *Control) handleReqWorkConn(_ msg.Message) {
|
|||||||
}
|
}
|
||||||
if err = ctl.sessionCtx.AuthSetter.SetNewWorkConn(m); err != nil {
|
if err = ctl.sessionCtx.AuthSetter.SetNewWorkConn(m); err != nil {
|
||||||
xl.Warn("error during NewWorkConn authentication: %v", err)
|
xl.Warn("error during NewWorkConn authentication: %v", err)
|
||||||
|
workConn.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err = msg.WriteMsg(workConn, m); err != nil {
|
if err = msg.WriteMsg(workConn, m); err != nil {
|
||||||
|
@ -17,6 +17,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
@ -282,7 +283,7 @@ func (svr *Service) apiProxyByTypeAndName(w http.ResponseWriter, r *http.Request
|
|||||||
res := GeneralResponse{Code: 200}
|
res := GeneralResponse{Code: 200}
|
||||||
params := mux.Vars(r)
|
params := mux.Vars(r)
|
||||||
proxyType := params["type"]
|
proxyType := params["type"]
|
||||||
name := params["name"]
|
name, _ := url.QueryUnescape(params["name"])
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
log.Info("Http response [%s]: code [%d]", r.URL.Path, res.Code)
|
log.Info("Http response [%s]: code [%d]", r.URL.Path, res.Code)
|
||||||
@ -350,7 +351,7 @@ type GetProxyTrafficResp struct {
|
|||||||
func (svr *Service) apiProxyTraffic(w http.ResponseWriter, r *http.Request) {
|
func (svr *Service) apiProxyTraffic(w http.ResponseWriter, r *http.Request) {
|
||||||
res := GeneralResponse{Code: 200}
|
res := GeneralResponse{Code: 200}
|
||||||
params := mux.Vars(r)
|
params := mux.Vars(r)
|
||||||
name := params["name"]
|
name, _ := url.QueryUnescape(params["name"])
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
log.Info("Http response [%s]: code [%d]", r.URL.Path, res.Code)
|
log.Info("Http response [%s]: code [%d]", r.URL.Path, res.Code)
|
||||||
|
@ -11,7 +11,7 @@ const props = defineProps<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
const fetchData = () => {
|
const fetchData = () => {
|
||||||
let url = '../api/traffic/' + props.proxyName
|
let url = '../api/traffic/' + encodeURIComponent(props.proxyName)
|
||||||
fetch(url, { credentials: 'include' })
|
fetch(url, { credentials: 'include' })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
return res.json()
|
return res.json()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user