24 lines
532 B
C++
24 lines
532 B
C++
|
|
#include <expected>
|
|
#include <string>
|
|
#include <chrono>
|
|
#include <cstring>
|
|
|
|
#include <tunnel.hpp>
|
|
#include <server.hpp>
|
|
|
|
using namespace std::chrono_literals;
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
Server srv;
|
|
auto createres = srv.Create("tun10", "10.1.2.1", 30);
|
|
if (!createres) {
|
|
std::cerr << "Error: " << createres.error() << std::endl;
|
|
return 1;
|
|
}
|
|
std::chrono::milliseconds timesleep(20s);
|
|
std::this_thread::sleep_for(timesleep);
|
|
return 0;
|
|
}
|