-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconst.go
54 lines (47 loc) · 1.3 KB
/
const.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package main
const (
AppName = "ngocok"
AppVersion = "1.0.0"
AppAuthor = "dwisiswant0"
)
const (
infGetAuthtokenMsg = "Get your token"
infGetAuthtokenRef = "https://dashboard.ngrok.com/get-started/your-authtoken"
sessOK = "client session established"
authFailed = "authentication failed"
reqReceived = "Request received"
)
const (
banner = `
_
___ ___ ___ ___ ___| |_
| | . | . | _| . | '_|
|_|_|_ |___|___|___|_,_|
|___| v` + AppVersion + `
--
made with ♥ by @` + AppAuthor + `
`
usage = `
Usage:
ngocok [OPTIONS...]
Options:
-e, --endpoint string ngrok tunnel endpoint ("http" or "tcp") (default: "http")
-t, --token string ngrok authentication token
--unstrip Unstrip X-Forwarded-{For,Host,Proto} headers
-o, --output string Log incoming requests to a file instead of stdout
Examples:
ngocok --endpoint tcp
ngocok --token [authtoken]
ngocok --output /path/to/requests.log
`
)
const (
errGetAuthtokenOpt = "cannot get authtoken anywhere"
errGetTunnelCustom = "cannot get tunnel for '%s' endpoint"
errGetTunnelEmpty = "cannot get tunnel for empty endpoint"
errRuntime = "runtime error"
)
const (
ngrokAuthtoken = "authtoken"
ngrokAuthtokenEnv = "NGROK_AUTHTOKEN"
)