mirror of
https://github.com/therootcompany/telebit.git
synced 2025-07-03 02:46:36 +00:00
- connectionWedge supports reading from a connection without consuming bytes (peeking) - allowing protocol detection - was still connections to 3502, it will support any port (443), admin follows this port. - matches RVPN.DAPLIE.INVALID and redirects to admin — AJ to provide authentication framework. - api/servers is also served by this path as we’ll. - listener_generic is the beginngins of protocol detections. - listener_wedge is an matches the net.Listener interface, and allows passing to other processes an already accepted connection - this does not work for HTTP for some reason. - spent a lot of time trying to figure out why. Posted to go-nuts
18 lines
299 B
Go
18 lines
299 B
Go
package genericlistener
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
)
|
|
|
|
var (
|
|
loginfo *log.Logger
|
|
logdebug *log.Logger
|
|
logFlags = log.Ldate | log.Lmicroseconds | log.Lshortfile
|
|
)
|
|
|
|
func init() {
|
|
loginfo = log.New(os.Stdout, "INFO: external: ", logFlags)
|
|
logdebug = log.New(os.Stdout, "DEBUG: external:", logFlags)
|
|
}
|