Compare commits
No commits in common. "dfede4a8162b27e2a277d8b0b7804eb74e56811c" and "435b3195d200e948281b621e53337ab36148ff6c" have entirely different histories.
dfede4a816
...
435b3195d2
@ -1,53 +0,0 @@
|
||||
% ==============================================================
|
||||
\section{Iodine}
|
||||
\index{iodine}\label{iodine}
|
||||
|
||||
Iodine, c'est quoi ? C'est un ensemble de logiciels qui permettent
|
||||
de se brancher sur l'Intertube même si on n'a pas d'accès
|
||||
«~autorisé~» par la voisine qui a déménagée vers la
|
||||
lointaine campagne avec sa friboite.
|
||||
|
||||
\begin{quote}
|
||||
This is a piece of software that lets you tunnel IPv4 data through a
|
||||
DNS server. This can be usable in different situations where internet
|
||||
access is firewalled, but DNS queries are allowed.
|
||||
The name iodine was chosen since it starts with IOD (IP Over DNS)
|
||||
and since iodine has atomic number 53, which happens to be the DNS
|
||||
port number.
|
||||
\end{quote}
|
||||
|
||||
À ce jour (2 septembre 2013) ce que vous allez lire est basé
|
||||
sur la version \texttt{0.6.0-rc1} et sera probablement plus ou
|
||||
moins incompatible avec les versions précedentes ou suivantes, ymmv.
|
||||
|
||||
\begin{verbatim}
|
||||
root@plop:iodine-0.6.0-rc1# bin/iodine teton.mooo.com -f -P m
|
||||
Opened dns0
|
||||
Opened UDP socket
|
||||
Sending DNS queries for teton.mooo.com to 192.168.1.1
|
||||
Autodetecting DNS query type (use -T to override)..................
|
||||
iodine: No suitable DNS query type found. Are you connected to a network?
|
||||
iodine: If you expect very long roundtrip delays, use -T explicitly.
|
||||
iodine: (Also, connecting to an "ancient" version of iodined won't work.)
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\subsection{Coté serveur}
|
||||
|
||||
Je pense qu'il faut commencer par voir du coté du DNS
|
||||
pour déléguer une sous-zone à la machine qui va faire tourner
|
||||
le serveur iodine. Mais j'en suis pas certain. RTFM.
|
||||
|
||||
\subsection{Coté client}
|
||||
|
||||
Je n'en sais pas plus non plus...
|
||||
|
||||
\begin{verbatim}
|
||||
sudo bin/iodine -f -P s3cr3tp4ssw0rd i.buvette.org
|
||||
\end{verbatim}
|
||||
|
||||
Donc, n'ayant plus vraiment (pour le moment) le besoin d'utiliser
|
||||
ce passe-muraille, je vais laisser ce passage en l'état...
|
||||
% ==============================================================
|
||||
|
||||
|
@ -1,54 +1,15 @@
|
||||
/* LISTEN OSC */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <lo/lo.h>
|
||||
|
||||
#define LOCAL_PORT "9000"
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
void error(int num, const char *msg, const char *path)
|
||||
{
|
||||
fprintf(stderr, "liblo server error %d in path %s : %s\n", num, path, msg);
|
||||
exit(1);
|
||||
}
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
int handler(const char *path, const char *types, lo_arg ** argv,
|
||||
int argc, void *data, void *udata)
|
||||
{
|
||||
static int event_number = 1;
|
||||
|
||||
printf("------ event #%d :\n", event_number++);
|
||||
printf("\tpath '%s' types '%s' argc %d\n",
|
||||
path, types, argc);
|
||||
|
||||
printf("\tdata %p\n", data);
|
||||
// if (NULL!=data) printf("\t >%s<\n", data);
|
||||
printf("\tudata %p\n", udata);
|
||||
if (NULL!=udata) printf("\t\t>%s<\n", (char *)udata);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
char signature[] = "Bourtoulots";
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
lo_server_thread st;
|
||||
int count = 0;
|
||||
|
||||
st = lo_server_thread_new(LOCAL_PORT, error);
|
||||
lo_server_thread_add_method(st, "/demo", "is", handler, signature);
|
||||
lo_server_thread_start(st);
|
||||
|
||||
for (;;) {
|
||||
fprintf(stderr, "%6d I'm alive\n", count++); sleep(10);
|
||||
}
|
||||
st = lo_server_thread_new(LOCAL_PORT, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -11,10 +11,8 @@ int main(int argc, char *argv[])
|
||||
lo_address loana;
|
||||
int foo;
|
||||
|
||||
fprintf(stderr, "sending to %s:%s\n", REMOTE_HOST, REMOTE_PORT);
|
||||
|
||||
loana = lo_address_new(REMOTE_HOST, REMOTE_PORT);
|
||||
foo = lo_send(loana, "/demo", "is", 61, "meg, efface !");
|
||||
fprintf(stderr, "got a %d return code ?\n", foo);
|
||||
foo = lo_send(loana, "/dev/kmem", "is", 61, "meg, efface !");
|
||||
fprintf(stderr, "foo %d\n", foo);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user