mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-06 17:13:13 +03:00
Telegram support, send config button
This commit is contained in:
parent
c691f0733d
commit
4c6080b3fa
8 changed files with 335 additions and 19 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/ngoduykhanh/wireguard-ui/store"
|
||||
"github.com/ngoduykhanh/wireguard-ui/telegram"
|
||||
"golang.org/x/mod/sumdb/dirhash"
|
||||
|
||||
externalip "github.com/glendc/go-external-ip"
|
||||
|
@ -28,7 +29,7 @@ import (
|
|||
)
|
||||
|
||||
// BuildClientConfig to create wireguard client config string
|
||||
func BuildClientConfig(client model.Client, server model.Server, setting model.GlobalSetting) string {
|
||||
var BuildClientConfig telegram.BuildClientConfig = func(client model.Client, server model.Server, setting model.GlobalSetting) string {
|
||||
// Interface section
|
||||
clientAddress := fmt.Sprintf("Address = %s\n", strings.Join(client.AllocatedIPs, ","))
|
||||
clientPrivateKey := fmt.Sprintf("PrivateKey = %s\n", client.PrivateKey)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue