mirror of
https://github.com/asmogo/nws.git
synced 2024-12-13 18:56:21 +00:00
26 lines
428 B
Go
26 lines
428 B
Go
package main
|
|
|
|
import (
|
|
"github.com/asmogo/nws/config"
|
|
"github.com/asmogo/nws/proxy"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
func main() {
|
|
// load the configuration
|
|
// from the environment
|
|
cfg, err := config.LoadConfig[config.ProxyConfig]()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
// create a new gw server
|
|
// and start it
|
|
socksProxy := proxy.New(context.Background(), cfg)
|
|
|
|
err = socksProxy.Start()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|