mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Run go fmt
This commit is contained in:
parent
be91ff62ef
commit
c285f0990f
6
api.go
6
api.go
@ -3,9 +3,9 @@ package main
|
||||
import (
|
||||
//"fmt"
|
||||
//"strings"
|
||||
"net/http"
|
||||
"io"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Api struct {
|
||||
@ -23,7 +23,6 @@ type CreateTunnelResponse struct {
|
||||
TunnelPrivateKey string `json:"tunnel_private_key"`
|
||||
}
|
||||
|
||||
|
||||
func NewApi(config *BoringProxyConfig, auth *Auth, tunMan *TunnelManager) *Api {
|
||||
|
||||
api := &Api{config, auth, tunMan, nil}
|
||||
@ -37,7 +36,6 @@ func NewApi(config *BoringProxyConfig, auth *Auth, tunMan *TunnelManager) *Api {
|
||||
return api
|
||||
}
|
||||
|
||||
|
||||
func (a *Api) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
a.mux.ServeHTTP(w, r)
|
||||
}
|
||||
|
@ -4,16 +4,16 @@ import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/GeertJohan/go.rice"
|
||||
"github.com/caddyserver/certmagic"
|
||||
"html/template"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"html/template"
|
||||
"strconv"
|
||||
"sync"
|
||||
"github.com/caddyserver/certmagic"
|
||||
"github.com/GeertJohan/go.rice"
|
||||
)
|
||||
|
||||
type BoringProxyConfig struct {
|
||||
@ -135,7 +135,6 @@ func (p *BoringProxy) handleAdminRequest(w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
indexTemplate, err := box.String("index.tmpl")
|
||||
if err != nil {
|
||||
w.WriteHeader(500)
|
||||
@ -151,7 +150,6 @@ func (p *BoringProxy) handleAdminRequest(w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
tmpl.Execute(w, p.tunMan.tunnels)
|
||||
|
||||
//io.WriteString(w, indexTemplate)
|
||||
@ -258,7 +256,6 @@ func (p *BoringProxy) handleLogin(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
http.Redirect(w, r, "/", 307)
|
||||
|
||||
|
||||
case "POST":
|
||||
|
||||
r.ParseForm()
|
||||
|
@ -1,13 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
)
|
||||
|
||||
|
||||
type BoringProxyClient struct {
|
||||
}
|
||||
|
||||
|
@ -2,19 +2,17 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"io/ioutil"
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
||||
|
||||
type SshServer struct {
|
||||
config *ssh.ServerConfig
|
||||
listener net.Listener
|
||||
}
|
||||
|
||||
|
||||
func NewSshServer() *SshServer {
|
||||
config := &ssh.ServerConfig{}
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/caddyserver/certmagic"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"strings"
|
||||
"sync"
|
||||
"crypto/rsa"
|
||||
"crypto/rand"
|
||||
"encoding/pem"
|
||||
"crypto/x509"
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
||||
type Tunnel struct {
|
||||
|
Loading…
Reference in New Issue
Block a user