ciniml/WireGuard-ESP32-Arduino
ciniml/WireGuard-ESP32-Arduino has 971 GitHub stars and 114 forks. GitHot measured 0 stars in 24 hours and +1 in 7 days. Last checked 2026-11-22 09:57 UTC. Last push 2024-04-01.
实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
关于
WireGuard implementation for ESP32 Arduino
开发工具README.md
原文WireGuard Implementation for ESP32 Arduino
This is an implementation of the WireGuard® for ESP32 Arduino.
Almost all of this code is based on the WireGuard Implementation for lwIP, but some potion of the code is adjusted to build with ESP32 Arduino.
How to use
- Include
WireGuard-ESP32.hat the early part of the sketch.
#include <WireGuard-ESP32.h>
- Define the instance of the
WireGuardclass at module level.
static WireGuard wg;
- Connect to WiFi AP by using
WiFiclass.
WiFi.begin(ssid, password);
while( !WiFi.isConnected() ) {
delay(1000);
}
- Sync the system time via NTP.
configTime(9 * 60 * 60, 0, "ntp.jst.mfeed.ad.jp", "ntp.nict.jp", "time.google.com");
- Start the WireGuard interface.
wg.begin(
local_ip, // IP address of the local interface
private_key, // Private key of the local interface
endpoint_address, // Address of the endpoint peer.
public_key, // Public key of the endpoint peer.
endpoint_port); // Port pf the endpoint peer.
You can see an example sketch uptime_post.ino, which connects SORACOM Arc WireGuard endpoint and post uptime to SORACOM Harvest via WireGuard connection.
License
The original WireGuard implementation for lwIP is licensed under BSD 3 clause license so the code in this repository also licensed under the same license.
Original license is below:
The code is copyrighted under BSD 3 clause Copyright (c) 2021 Daniel Hope (www.floorsense.nz)
See LICENSE for details
探索相关项目
加载中…