Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On how to customize the email content, I found a solution and open the tutorial #639

Open
axp007 opened this issue Oct 16, 2024 · 0 comments

Comments

@axp007
Copy link

axp007 commented Oct 16, 2024

1, pull the official source code

apt update
apt install git
git clone https://github.com/ngoduykhanh/wireguard-ui.git

2, Modify main.go source code

vim main.go# Open the source file, search for const, find the following, modify
Before modification:

const (                         
        defaultEmailSubject = "Your wireguard configuration"
        defaultEmailContent = `Hi,</br>
<p>In this email you can find your personal configuration for our wireguard server.</p>

<p>Best</p>
`
)

Customize the modification, for example:

const (
        defaultEmailSubject = "Please check your Bee Talk VPN personal account!"
        defaultEmailContent = `Hi,</br>
<p>This is your personal VPN account, please refer to the VPN usage method<a href="https://blog.csdn.net/qq_62294245?spm=1000.2115.3001.5343" target="_blank">How to use VPN for employees</a></p>
<br>

<p>
  VPN related questions please nail nail contact: company headquarters/R&D center /
  <strong>Xiaopeng(anxiaopeng001@gmail.com)</strong>
</p>

<br>
<p>Download the VPN client software:https://www.wireguard.com/install/</p>

<br><br>
<strong>Xi 'an Xopeng linux Technology Co., LTD</strong>
`
)

3. Compile the image with Dockerfile

docker build --build-arg=GIT_COMMIT=$(git rev-parse --short HEAD) -t xiaopeng/wireguard-ui .

Wait until the image is compiled and check whether the image is generated

docker images
REPOSITORY                TAG       IMAGE ID       CREATED         SIZE
xiaopeng/wireguard-ui      latest    6f2552b43d3d   8 seconds ago   61.4MB

4. Edit the docker-compose file and start the container

Adjust the docker-compose file content to suit you
Run the wireguard-ui container

docker-compose up -d
docker ps -a

6. Note:

If the wireguard ui page cannot be accessed in a browser, the WireGuard UI page

rm -rf ./config/wg_confs/wg0.conf
mv ./config/wg0.conf ./config/wg_confs/wg0.conf

docker restart wireguard wireguard-ui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant