-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.go
24 lines (20 loc) · 2.01 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main
import (
"fmt"
yaklog "github.com/yaklang/yaklang/common/log"
"socks2https/porxy"
"socks2https/setting"
)
const PROGRAM_NAME = "\n███████╗ ██████╗ ██████╗██╗ ██╗███████╗██████╗ ██╗ ██╗████████╗████████╗██████╗ ███████╗\n██╔════╝██╔═══██╗██╔════╝██║ ██╔╝██╔════╝╚════██╗██║ ██║╚══██╔══╝╚══██╔══╝██╔══██╗██╔════╝\n███████╗██║ ██║██║ █████╔╝ ███████╗ █████╔╝███████║ ██║ ██║ ██████╔╝███████╗\n╚════██║██║ ██║██║ ██╔═██╗ ╚════██║██╔═══╝ ██╔══██║ ██║ ██║ ██╔═══╝ ╚════██║\n███████║╚██████╔╝╚██████╗██║ ██╗███████║███████╗██║ ██║ ██║ ██║ ██║ ███████║\n╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝\n \n"
func init() {
fmt.Println(PROGRAM_NAME)
yaklog.SetLevel(setting.Config.Log.Level)
}
func main() {
mitmSocks := porxy.NewMITMServer()
mitmSocks.Host = setting.Config.MITM.Host
mitmSocks.Threads = setting.Config.MITM.Threads
mitmSocks.ClientTimeout = setting.Config.MITM.Timeout.Client
mitmSocks.TargetTimeout = setting.Config.MITM.Timeout.Target
mitmSocks.Run()
}