-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3416e55
commit 5badc67
Showing
4 changed files
with
144 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,34 @@ | ||
package openvpn | ||
|
||
import "time" | ||
import ( | ||
"fmt" | ||
"time" | ||
) | ||
|
||
type Config struct { | ||
Command string | ||
ConfigFile string | ||
Proto string | ||
Remote string | ||
Port string | ||
Command string | ||
CACertificate string | ||
Proto string | ||
Remote string | ||
Port int | ||
|
||
TerminationTimeout time.Duration | ||
} | ||
|
||
func (c Config) pipe() (*pipe, error) { | ||
return newTextSourcePipe(fmt.Sprintf(` | ||
client | ||
dev tun | ||
proto tcp | ||
nobind | ||
persist-key | ||
persist-tun | ||
remote-cert-tls server | ||
cipher AES-256-GCM | ||
<ca> | ||
%s | ||
</ca> | ||
auth-nocache | ||
reneg-sec 0`, c.CACertificate)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters