update github actions (#3538)

This commit is contained in:
fatedier
2023-07-21 10:30:46 +08:00
committed by GitHub
parent efcc028a3d
commit 46ff40543a
33 changed files with 72 additions and 108 deletions

View File

@@ -39,12 +39,12 @@ type GeneralResponse struct {
}
// /healthz
func (svr *Service) healthz(w http.ResponseWriter, r *http.Request) {
func (svr *Service) healthz(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(200)
}
// GET /api/reload
func (svr *Service) apiReload(w http.ResponseWriter, r *http.Request) {
func (svr *Service) apiReload(w http.ResponseWriter, _ *http.Request) {
res := GeneralResponse{Code: 200}
log.Info("api request [/api/reload]")
@@ -74,7 +74,7 @@ func (svr *Service) apiReload(w http.ResponseWriter, r *http.Request) {
}
// POST /api/stop
func (svr *Service) apiStop(w http.ResponseWriter, r *http.Request) {
func (svr *Service) apiStop(w http.ResponseWriter, _ *http.Request) {
res := GeneralResponse{Code: 200}
log.Info("api request [/api/stop]")
@@ -124,7 +124,7 @@ func NewProxyStatusResp(status *proxy.WorkingStatus, serverAddr string) ProxySta
}
// GET /api/status
func (svr *Service) apiStatus(w http.ResponseWriter, r *http.Request) {
func (svr *Service) apiStatus(w http.ResponseWriter, _ *http.Request) {
var (
buf []byte
res StatusResp = make(map[string][]ProxyStatusResp)
@@ -153,7 +153,7 @@ func (svr *Service) apiStatus(w http.ResponseWriter, r *http.Request) {
}
// GET /api/config
func (svr *Service) apiGetConfig(w http.ResponseWriter, r *http.Request) {
func (svr *Service) apiGetConfig(w http.ResponseWriter, _ *http.Request) {
res := GeneralResponse{Code: 200}
log.Info("Http get request [/api/config]")

View File

@@ -124,7 +124,7 @@ func (ctl *Control) Run() {
go ctl.vm.Run()
}
func (ctl *Control) HandleReqWorkConn(inMsg *msg.ReqWorkConn) {
func (ctl *Control) HandleReqWorkConn(_ *msg.ReqWorkConn) {
xl := ctl.xl
workConn, err := ctl.connectServer()
if err != nil {

View File

@@ -40,7 +40,7 @@ type GeneralTCPProxy struct {
*BaseProxy
}
func NewGeneralTCPProxy(baseProxy *BaseProxy, cfg config.ProxyConf) Proxy {
func NewGeneralTCPProxy(baseProxy *BaseProxy, _ config.ProxyConf) Proxy {
return &GeneralTCPProxy{
BaseProxy: baseProxy,
}

View File

@@ -77,7 +77,7 @@ func (pxy *SUDPProxy) Close() {
}
}
func (pxy *SUDPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) {
func (pxy *SUDPProxy) InWorkConn(conn net.Conn, _ *msg.StartWorkConn) {
xl := pxy.xl
xl.Info("incoming a new work connection for sudp proxy, %s", conn.RemoteAddr().String())

View File

@@ -86,7 +86,7 @@ func (pxy *UDPProxy) Close() {
}
}
func (pxy *UDPProxy) InWorkConn(conn net.Conn, m *msg.StartWorkConn) {
func (pxy *UDPProxy) InWorkConn(conn net.Conn, _ *msg.StartWorkConn) {
xl := pxy.xl
xl.Info("incoming a new work connection for udp proxy, %s", conn.RemoteAddr().String())
// close resources releated with old workConn

View File

@@ -370,7 +370,7 @@ func (ks *KCPTunnelSession) Init(listenConn *net.UDPConn, raddr *net.UDPAddr) er
return nil
}
func (ks *KCPTunnelSession) OpenConn(ctx context.Context) (net.Conn, error) {
func (ks *KCPTunnelSession) OpenConn(_ context.Context) (net.Conn, error) {
ks.mu.RLock()
defer ks.mu.RUnlock()
session := ks.session