server A
umask 077
wg genkey > private
wg pubkey < private
iplinkadd wg0 type wireguard
ip addr add192.168.1.1/24 dev wg0
wg set wg0 private-key ./private
iplinkset wg0 up[root@localhost ~]# wg
interface: wg0public key: ljISFZM9ueE/1EDSK5TdClJX1jXed33VFF+Hy=private key: (hidden)listening port: 60419wg set wg0 peer dRFqzYMolk1lYDNZCjH8g1hhKxvqCg/tr66MxHE= allowed-ips 192.168.1.2/32 endpoint 192.168.6.22:55109
server B
umask 077
wg genkey > private
wg pubkey < private
iplinkadd wg0 type wireguard
ip addr add192.168.1.2/24 dev wg0
wg set wg0 private-key ./private
iplinkset wg0 up[root@localhost ~]# wg
interface: wg0public key: dRFqzYMolk1lYDNZCjH8g1hhKxvqCg/tr66MxHE=private key: (hidden)listening port: 55109wg set wg0 peer ljISFZM9ueE/1EDSK5TdClJX1jXed33VFF+Hy= allowed-ips 192.168.1.1/32 endpoint 192.168.6.21:60419
备注:删除peer
wg set wg0 peer ljISFZM9ueE/1EDSK5TdClJX1jXed33VFF+Hy= remove
直接应用配置文件:
wg setconf wg0 /etc/wireguard/wg0.conf
select * from pdb_plug_in_violations;
有个waring service_name 冲突,应该是不影响的 -------------------------------------service 冲突解决-------------------
Select message, action from DB_PLUG_IN_VIOLATIONS and get the result:
MESSAG…
拷贝初始化和直接初始化
string str1("I am a string");//语句1 直接初始化
string str2(str1);//语句2 直接初始化,str1是已经存在的对象,直接调用拷贝构造函数对str2进行初始化
string str3 = "I am a string";//语句3 拷贝初始化,先为字符串”I am …
1 介绍
无刷直流电机(Brushless Direct Current Motor,简称BLDCM)由电动机主体和驱动器组成,是一种典型的机电一体化产品。无刷电机是指无电刷和换向器(或集电环)的电机,又称无换向器电机。这是…