| 29 | ) |
| 30 | |
| 31 | type Proxy struct { |
| 32 | Kite *kite.Kite |
| 33 | |
| 34 | listener net.Listener |
| 35 | TLSConfig *tls.Config |
| 36 | |
| 37 | readyC chan bool // To signal when kite is ready to accept connections |
| 38 | closeC chan bool // To signal when kite is closed with Close() |
| 39 | |
| 40 | // If givent it must match the domain in certificate. |
| 41 | PublicHost string |
| 42 | |
| 43 | // For generating token tokens for tunnels. |
| 44 | pubKey string |
| 45 | privKey string |
| 46 | |
| 47 | // Holds registered kites. Keys are kite IDs. |
| 48 | kites map[string]*PrivateKite |
| 49 | |
| 50 | mux *http.ServeMux |
| 51 | |
| 52 | RegisterToKontrol bool |
| 53 | |
| 54 | url *url.URL |
| 55 | } |
| 56 | |
| 57 | func New(conf *config.Config, version, pubKey, privKey string) *Proxy { |
| 58 | k := kite.New("tunnelproxy", version) |
nothing calls this directly
no outgoing calls
no test coverage detected