mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			Updated the wireguard script, resolved the routing issue, and removed unnecessary descriptions. (#1897)
							parent
							
								
									472e2c6050
								
							
						
					
					
						commit
						162686c3fd
					
				|  | @ -7,8 +7,6 @@ WG_PRIVKEY="$(fw_printenv -n wg_privkey)" | ||||||
| ( echo "#" | ( echo "#" | ||||||
|   echo "[Interface]" |   echo "[Interface]" | ||||||
|   echo "PrivateKey = $WG_PRIVKEY" |   echo "PrivateKey = $WG_PRIVKEY" | ||||||
|   # echo "Address = $(fw_printenv -n wg_address)" |  | ||||||
|   # echo "DNS = $(fw_printenv -n wg_dns)" |  | ||||||
|   echo |   echo | ||||||
|   echo "[Peer]" |   echo "[Peer]" | ||||||
|   echo "Endpoint = $(fw_printenv -n wg_endpoint)" |   echo "Endpoint = $(fw_printenv -n wg_endpoint)" | ||||||
|  | @ -27,3 +25,7 @@ if [ -z "$wg_address" ]; then | ||||||
| fi | fi | ||||||
| ip address add dev wg0 "$wg_address" | ip address add dev wg0 "$wg_address" | ||||||
| ip link set up dev wg0 | ip link set up dev wg0 | ||||||
|  | for i in $(fw_printenv -n wg_allowed | tr ',' ' '); do | ||||||
|  |     ip -4 route add "$i" dev wg0 | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue