ciniml/WireGuard-ESP32-Arduino
소개
ESP32 Arduino용 WireGuard 구현
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalWireGuard 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
관련 프로젝트 살펴보기
불러오는 중…