julznc / dtlsproxy Goto Github PK
View Code? Open in Web Editor NEWtinydtls-based reverse proxy server
License: MIT License
tinydtls-based reverse proxy server
License: MIT License
Hi, I get a compile error when trying to compile on debian jessie:
foo@bar:~/dtlsproxy# make
cc -I. -I./tinydtls -Wall -O2 -g -c -o main.o main.c
cc -I. -I./tinydtls -Wall -O2 -g -c -o utils.o utils.c
cc -I. -I./tinydtls -Wall -O2 -g -c -o proxy.o proxy.c
proxy.c: In function 'get_psk_info':
proxy.c:23:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (keystore_t *psk=ctx->psk; psk && psk->id; psk=psk->next) {
^
proxy.c:23:9: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
<builtin>: recipe for target 'proxy.o' failed
make: *** [proxy.o] Error 1
When adding -std=C99 to the Makefile CFLAGS, I get even more errors. However when switching back and forth, I eventually get it compiled since each call compiles some files successfully.
After compilation however, it crashes with a segfault:
foo@bar:~/dtlsproxy# ./dtlsproxy -l 0.0.0.0:5684 -b 127.0.0.1:15683 -k Client_identity:secretPSK
main.c[42] ./dtlsproxy started
proxy.c[159] listen: 0.0.0.0:5684
Segmentation fault
Not sure if it has something do do with the "odd" compilation procedure.
I am using debian 8.10, uname -ar shows Linux bar 4.9.49-moby #1 SMP Fri Dec 8 13:40:02 UTC 2017 x86_64 GNU/Linux
Any help is appreciated.
Would it be possible to read the PSKs and IDs from a source that could be changed from another program?
For example, you could constantly create new keys from a NodeJS CoAP server for new CoAP clients (or client groups).
Perhaps, there is a need for an additional lock-file to prevent missing config parts while reading.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.