()
| 113 | } |
| 114 | |
| 115 | func (p *HTTPS2HTTPPlugin) genTLSConfig() (*tls.Config, error) { |
| 116 | cert, err := tls.LoadX509KeyPair(p.crtPath, p.keyPath) |
| 117 | if err != nil { |
| 118 | return nil, err |
| 119 | } |
| 120 | |
| 121 | config := &tls.Config{Certificates: []tls.Certificate{cert}} |
| 122 | return config, nil |
| 123 | } |
| 124 | |
| 125 | func (p *HTTPS2HTTPPlugin) Handle(conn io.ReadWriteCloser, realConn net.Conn, extraBufToLocal []byte) { |
| 126 | wrapConn := frpNet.WrapReadWriteCloserToConn(conn, realConn) |
no outgoing calls
no test coverage detected