• Stars
    star
    807
  • Rank 56,489 (Top 2 %)
  • Language
    C
  • License
    Other
  • Created over 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WireGuard implementation for ESP32 Arduino

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

  1. Include WireGuard-ESP32.h at the early part of the sketch.
#include <WireGuard-ESP32.h>
  1. Define the instance of the WireGuard class at module level.
static WireGuard wg;
  1. Connect to WiFi AP by using WiFi 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 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

More Repositories

1

rust-dap

CMSIS-DAP Rust implementation
Rust
88
star
2

seccamp_riscv_cpu

セキュリティ・キャンプ 2022-2024 RISC-V CPU自作ゼミ 資料置き場
Rust
35
star
3

xvc-esp32

Xilinx Virtual Cable implementation for ESP32
C++
30
star
4

seccamp_2022_riscv_cpu

セキュリティキャンプ 2022 Y4 RISC-V CPU自作ゼミ 講義資料
28
star
5

atom_display_fpga

FPGA design sources for ATOM Display FPGA
GLSL
25
star
6

kicad-libs-akiduki

秋月で売ってる部品のKiCad用ライブラリ
22
star
7

fpga_samples

FPGA samples
Scala
22
star
8

ExtFlashLoader

External flash loader library for Wio Terminal
C++
20
star
9

tn_serv

SERV RISC-V sample for Tang Nano FPGA board
SystemVerilog
18
star
10

debug-tools-builder

Build scripts of debug tools for Cortex M
Dockerfile
15
star
11

Ultra96Samples

Unofficial Ultra96 sample projects
Tcl
10
star
12

esp32-rust-examples

Embedded rust example projects for ESP32
Rust
9
star
13

M5Stack_Gadgets

M5Stack用小物集
G-code
9
star
14

M5Stack_WiSUN

firmware and schematic for M5Stack WiSUN board
Python
8
star
15

lgfx-rs

Rust binding of LovyanGFX
Rust
8
star
16

WioTerminalHarmony

Wio Terminal sample project using MPLAB Harmony and OpenOCD debugger on VSCode
C++
8
star
17

ESP32_WireGuard

An example of ESP32 WireGuard connection
C
8
star
18

WioTerminalChan

ワイオターミナルチャン
Rust
7
star
19

Win10IoTBLEScanner

BLE advertisement scanner on Windows 10 IoT Core
C#
7
star
20

rust-erpc

eRPC implementation for Rust
Python
7
star
21

stackchan-rs

Stack-chan firmware in Rust
Rust
7
star
22

pynqz1fb

A Linux framebuffer driver kernel module for PYNQ-Z1 base overlay
C
7
star
23

esp32-nvs-rs

Rust implementation of ESP32 NVS partition generator.
Rust
6
star
24

TangFPGAExtensions

Extension boards for Tang series FPGA boards
Shell
6
star
25

m5stack_matter_examples

Matter device firmware examples for M5Stack devices.
C
5
star
26

TpiProgrammer

An AVR programmer which uses MPSSE capable FTDI devices as TPI master.
C#
5
star
27

pyocd-rtos-trykernel

pyOCD RTOS plugin for Try Kernel
Python
5
star
28

m5stack-remo-monitor

Nature Remo sensor monitor
Rust
4
star
29

scs-servo-rs

SCS Servo protocol implementation for Rust.
Rust
4
star
30

CoreMP135_Stackchan

Stackchan base firmware for CoreMP135
Makefile
4
star
31

if202212_gowin

インターフェース2022年12月号 別冊付録1 ソースコード
SystemVerilog
4
star
32

M5_UIFlow_Blocks

UI Flow custom blocks for M5Stack devices.
Python
4
star
33

ebaz4205_ethernet

100M Ethernet Design for EBAZ4205
HTML
4
star
34

WioTerminalSimpleLoader

Simple application loader for Wio Terminal
C++
4
star
35

M5Stack_TangNano

Tang Nano support project for M5Stack
SystemVerilog
3
star
36

PinTableGenerator

Generates SVG pin table
Python
3
star
37

RPiPico_DebugBoard

A debug utility board for Raspberry Pi Pico
Shell
3
star
38

fuga-json-seq-parser

Sequential JSON Parser for Low Memory Systems
Rust
3
star
39

gowin_blinky

Blinky example projects for GOWIN FPGAs
Makefile
3
star
40

openocd

A fork of OpenOCD for experimental use
C
3
star
41

m5stack-avatar-rs

Unofficial Rust implementation of M5Stack-Avatar
Rust
3
star
42

node-red_nature-cloud-api_example

Node-RED example flow for Nature Remo Cloud API
2
star
43

m5stickc_multinode_sensor

C++
2
star
44

WioTerminal_BackLight

Back Light control implementation for Seeed Wio Terminal
C++
2
star
45

esp32_realtime_test

C
2
star
46

esp32-rust

ESP32 Rust example project
Rust
2
star
47

rust-llvm-xtensa

A fork of LLVM which supports rustc to emit Espressif ESP32 code
C++
2
star
48

WioTerminal_SimpleMenu

Simple TF card launcher for Wio Terminal
Rust
1
star
49

BL600

BL600
Prolog
1
star
50

ImageLoader

A simple binary image loader such as Intel HEX and Motorola S-Record
C#
1
star
51

StructPack

Pack a struct type instance to a byte array.
C#
1
star
52

if2023_rust_samples

Rust
1
star
53

fpga_network_loopback

Tcl
1
star
54

fpga_seminar_14

実践的FPGAセミナー 第14回 続 腕の見せ所が満載なFPGA開発ボードのすすめ の資料
1
star
55

edgetech_plus_22

Slides for EdgeTech+ 2022 Tang Nano 9K session
1
star
56

umcache

User mode cache using userfaultfd
C++
1
star
57

remo-api

Unofficial Rust implementation of Remo Cloud API parser
Rust
1
star
58

SAMD51_Timer

Timer implementation for ATSAMD51
C++
1
star
59

lgfx-idf-example

Minimal ESP-IDF project which uses LovyanGFX
CMake
1
star
60

mpy-wiolte

Wio LTE support for MicroPython
Python
1
star
61

reTerminal_Back_Expander

Back expander module for reTerminal
Python
1
star
62

if2018_09_wifiap_source

ESP32 Wi-Fi communication sample code
C++
1
star
63

esp_sensorhub

Bluetooth Low Energy to Wi-Fi Sensor hub application for ESP32
C++
1
star