renaming things
This commit is contained in:
parent
1600c960ab
commit
7fdb393696
|
@ -3,12 +3,13 @@
|
||||||
certs
|
certs
|
||||||
acme.d
|
acme.d
|
||||||
|
|
||||||
*.exe
|
|
||||||
/telebitd
|
|
||||||
/cmd/telebitd/telebitd
|
|
||||||
/telebit
|
/telebit
|
||||||
/cmd/telebit/telebit
|
/cmd/telebit/telebit
|
||||||
/debug
|
/telebitd
|
||||||
|
/cmd/telebitd/telebitd
|
||||||
|
/telebit-relay
|
||||||
|
/cmd/telebit-relay/telebit-relay
|
||||||
|
*.exe
|
||||||
|
|
||||||
log.txt
|
log.txt
|
||||||
*.log
|
*.log
|
||||||
|
|
|
@ -33,11 +33,11 @@ tmp $ serve-https -p 8080 -d /tmp --servername hfc.rootprojects.org --agree-tos
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# For .env
|
# For .env
|
||||||
TELEBIT_SECRET=abcdef1234567890
|
SECRET=abcdef1234567890
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node-tunnel-client $ bin/stunnel.js --locals http://hfc.rootprojects.org:8080,http://test1.hfc.rootprojects.org:8080 --stunneld wss://localhost.rootprojects.org:8443 --secret abcdef1234567890
|
node-tunnel-client $ bin/stunnel.js --locals http://hfc.rootprojects.org:8080,http://test1.hfc.rootprojects.org:8080 --relay wss://localhost.rootprojects.org:8443 --secret abcdef1234567890
|
||||||
```
|
```
|
||||||
|
|
||||||
### Execute RVPN
|
### Execute RVPN
|
||||||
|
|
|
@ -24,12 +24,12 @@ func init() {
|
||||||
viper.BindPFlag("locals", flag.Lookup("locals"))
|
viper.BindPFlag("locals", flag.Lookup("locals"))
|
||||||
viper.BindPFlag("domains", flag.Lookup("domains"))
|
viper.BindPFlag("domains", flag.Lookup("domains"))
|
||||||
|
|
||||||
flag.BoolP("insecure", "k", false, "Allow TLS connections to stunneld without valid certs")
|
flag.BoolP("insecure", "k", false, "Allow TLS connections to telebit-relay without valid certs")
|
||||||
flag.String("stunneld", "", "the domain (or ip address) at which the RVPN server is running")
|
flag.String("relay", "", "the domain (or ip address) at which the RVPN server is running")
|
||||||
flag.String("secret", "", "the same secret used by stunneld (used for JWT authentication)")
|
flag.String("secret", "", "the same secret used by telebit-relay (used for JWT authentication)")
|
||||||
flag.String("token", "", "a pre-generated token to give the server (instead of generating one with --secret)")
|
flag.String("token", "", "a pre-generated token to give the server (instead of generating one with --secret)")
|
||||||
viper.BindPFlag("raw.insecure", flag.Lookup("insecure"))
|
viper.BindPFlag("raw.insecure", flag.Lookup("insecure"))
|
||||||
viper.BindPFlag("raw.stunneld", flag.Lookup("stunneld"))
|
viper.BindPFlag("raw.relay", flag.Lookup("relay"))
|
||||||
viper.BindPFlag("raw.secret", flag.Lookup("secret"))
|
viper.BindPFlag("raw.secret", flag.Lookup("secret"))
|
||||||
viper.BindPFlag("raw.token", flag.Lookup("token"))
|
viper.BindPFlag("raw.token", flag.Lookup("token"))
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if viper.GetString("raw.stunneld") == "" {
|
if viper.GetString("raw.relay") == "" {
|
||||||
panic("must provide remote RVPN server to connect to")
|
panic("must provide remote RVPN server to connect to")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ func main() {
|
||||||
|
|
||||||
config := client.Config{
|
config := client.Config{
|
||||||
Insecure: viper.GetBool("raw.insecure"),
|
Insecure: viper.GetBool("raw.insecure"),
|
||||||
Server: viper.GetString("raw.stunneld"),
|
Server: viper.GetString("raw.relay"),
|
||||||
Services: servicePorts,
|
Services: servicePorts,
|
||||||
Token: token,
|
Token: token,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue