Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WireGuard implementation for ESP32 Arduino

License

NotificationsYou must be signed in to change notification settings

Tinkerforge/WireGuard-ESP32-Arduino

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an implementation of theWireGuard® for ESP32 Arduino.

Almost all of this code is based on theWireGuard Implementation for lwIP, but some potion of the code is adjusted to build with ESP32 Arduino.

How to use

  1. IncludeWireGuard-ESP32.h at the early part of the sketch.
#include<WireGuard-ESP32.h>
  1. Define the instance of theWireGuard class at module level.
static WireGuard wg;
  1. Connect to WiFi AP by usingWiFi class.
WiFi.begin(ssid, password);while( !WiFi.isConnected() ) {delay(1000);}
  1. Sync the system time via NTP.
configTime(9 *60 *60,0,"ntp.jst.mfeed.ad.jp","ntp.nict.jp","time.google.com");
  1. 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 sketchuptime_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

About

WireGuard implementation for ESP32 Arduino

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C94.1%
  • C++5.9%

[8]ページ先頭

©2009-2025 Movatter.jp