#include #include #include #include #include "tunnel.h" #include "macro.h" int main(int argc __unused, char *argv[] __unused) { #if 0 if (geteuid() != 0) errx(EXIT_FAILURE, "running as root required"); #endif int sock = tunnel_client(); if (sock < 0) errx(EXIT_FAILURE, "tunnel_connect failed"); char buf[512]; int n = read(sock, buf, sizeof(buf)); if (n < 0) err(EXIT_FAILURE, "read"); printf("%.*s\n", n, buf); close(sock); return 0; }