Skip to content

xenolf/protomux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple PoC for multiplexing multiple protocols over a single port

listener, err := protomux.Listen(":443")
if err != nil {
  return err
}

for {
  var conn protomux.Conn
  conn, err = listener.Accept()
  if err != nil {
    return err
  }
  
  switch conn.Protocol() {
  case protomux.HTTP:
    // do something
  case protomux.TLS:
    // too something encrypted
  case protomux.None:
    // forward TCP
  }
}

About

Nothing to see here, move along :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages