| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 1 | Forban is a p2p application for link-local and local area network. |
| 2 | ||
| 3 | Forban works independently from Internet and use only the local |
|
| 4 | area capabilities to announce, discover, search or share files. |
|
| 5 | Forban relies on HTTP and he is opportunistic. |
|
| 6 | ||
| 7 | The name took his origins from the old French word : |
|
| 8 | http://fr.wiktionary.org/wiki/forban |
|
| 9 | ||
| df04c1e by Alexandre Dulaunoy at 2009-12-20 | 10 | Forban name can be also a playword in English |
| 11 | for banning an unwanted software or services on Internet. |
|
| 12 | ||
| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 13 | Forban is free software licensed under |
| 14 | the GNU Affero General Public License version 3. |
|
| 15 | http://www.fsf.org/licensing/licenses/agpl-3.0.html |
|
| 16 | ||
| 17 | ||
| 18 | == message format used for announce/discovery == |
|
| 19 | ||
| 88f500d by Alexandre Dulaunoy at 2009-12-22 | 20 | === announce message === |
| 21 | ||
| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 22 | ASCII encoded message using UDP on port 12555 with |
| 23 | the following format: |
|
| 24 | ||
| c60ec3e by Alexandre Dulaunoy at 2010-04-17 | 25 | forban;name;<nameoftheforban>;uuid;<identityoftheforban>;hmac;<hmacvaluecofindex> |
| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 26 | |
| ad96148 by Alexandre Dulaunoy at 2009-12-22 | 27 | The messages are flooded in broadcast (IPv4) and using |
| 28 | ff02::1 (IPv6) at a regular interval. |
|
| 29 | ||
| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 30 | Based on the source IP and the destination port used, |
| df04c1e by Alexandre Dulaunoy at 2009-12-20 | 31 | a HTTP URL is build to get to default forban service. |
| 32 | ||
| 88f500d by Alexandre Dulaunoy at 2009-12-22 | 33 | === HTTP services for Forban === |
| 34 | ||
| df04c1e by Alexandre Dulaunoy at 2009-12-20 | 35 | The UDP port 12555 is there for announcing forban services. |
| 36 | The TCP port 12555 is the HTTP server running for forban services. |
|
| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 37 | |
| afffee5 by Alexandre Dulaunoy at 2010-01-23 | 38 | base URL: [REQUIRED] |
| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 39 | http://<ip>:<destport>/ |
| afffee5 by Alexandre Dulaunoy at 2010-01-23 | 40 | |
| 41 | index URL where Forban stored his index: [REQUIRED] |
|
| de283f3 by Alexandre Dulaunoy at 2009-12-22 | 42 | http://<ip>:<destport>/s/?g=forban/index |
| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 43 | |
| afffee5 by Alexandre Dulaunoy at 2010-01-23 | 44 | store URL where Forban stored his loot and how to get a file: [REQUIRED] |
| 49d5153 by Alexandre Dulaunoy at 2010-03-21 | 45 | http://<ip>:<destport>/s/?g=base64_urlsafe(<filenamefromindex>)&f=b64e |
| afffee5 by Alexandre Dulaunoy at 2010-01-23 | 46 | |
| 47 | search URL: [OPTIONAL] |
|
| 48 | http://<ip>:<destport>/q/?v=<yoursearch>&r=<refreshtimeinsec> |
|
| 49 | ||
| 50 | REQUIRED interfaces are required to have a full operational Forban |
|
| 51 | protocol in all the modes. The OPTIONAL interfaces are not required |
|
| 52 | for machine-to-machine interaction but used to ease the life of the users. |
|
| 53 | ||
| 49d5153 by Alexandre Dulaunoy at 2010-03-21 | 54 | ==== base64_urlsafe function (b64e) ==== |
| 55 | ||
| 56 | '+' is replaced by '-'. |
|
| 57 | '/' is replaced by '_'(underscore). |
|
| 58 | '=' is replaced by '!'. |
|
| 59 | ||
| 60 | This is following the same approach of MIME::Base64::URLSafe |
|
| 61 | or the python base64.urlsafe_b64encode with an addition to |
|
| 62 | the equal sign being replaced by an exclamation mark. |
|
| 63 | ||
| afffee5 by Alexandre Dulaunoy at 2010-01-23 | 64 | === Forban mode available === |
| 65 | ||
| 66 | * Opportunistic mode |
|
| 67 | * Shared mode |
|
| 68 | ||
| 69 | The opportunistic mode and shared used all the REQUIRED components of |
|
| 70 | the protocol. The only difference is the lack of automatic file fetching |
|
| 71 | in the shared mode. The shared mode is usally used on fixed node content |
|
| 72 | where the opportunistic fetching is not desired (e.g. a fixed bookshelf). |
|
| 73 | ||
| 74 | The opportunistic mode is working as a simple gossip (or epidemic) protocol |
|
| 75 | to replicate the information from one local to another local Forban. |
|
| 76 | ||
| 4e63c44 by Alexandre Dulaunoy at 2009-10-11 | 77 | === message format - notes about HMAC === |
| 78 | ||
| c60ec3e by Alexandre Dulaunoy at 2010-04-17 | 79 | The optional HMAC value has two purposes : |
| 80 | ||
| 81 | * To know if the index has been updated |
|
| 82 | * and to verify (if a PSK is set) if the index has been tampered. |
|
| 83 | ||
| 84 | When a PSK is not set, the default PSK value is 'Forban'. |
|
| 85 | ||
| 86 | The value is optional as other Forban can download any index when they |
|
| 87 | want. |
|
| d526ff5 by Alexandre Dulaunoy at 2009-10-05 | 88 | |
| 06bfc5f by Alexandre Dulaunoy at 2009-12-22 | 89 | === software required === |
| 90 | ||
| 41294ef by Alexandre Dulaunoy at 2010-08-28 | 91 | * Python (tested successfully with 2.5, 2.6 and 2.7) - 2.5 is required for the uuid library |

