{"id":17921521,"url":"https://github.com/theopolis/gelf","last_synced_at":"2025-07-04T23:39:45.182Z","repository":{"id":2955246,"uuid":"3969288","full_name":"theopolis/gelf","owner":"theopolis","description":"Virtual L1 via HTTP using Python, Websocks, and Javascript.","archived":false,"fork":false,"pushed_at":"2012-04-15T06:55:19.000Z","size":140,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-09T00:31:42.615Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theopolis.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-09T05:20:15.000Z","updated_at":"2013-10-11T02:14:40.000Z","dependencies_parsed_at":"2022-08-27T09:51:12.464Z","dependency_job_id":null,"html_url":"https://github.com/theopolis/gelf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopolis%2Fgelf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopolis%2Fgelf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopolis%2Fgelf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopolis%2Fgelf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theopolis","download_url":"https://codeload.github.com/theopolis/gelf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246989752,"owners_count":20865331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T20:34:35.757Z","updated_at":"2025-04-03T11:14:35.734Z","avatar_url":"https://github.com/theopolis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"== Introduction ==\nGelf is a forwarding application that utilizes a producer / consumer model, \na client and server interface, and a web browser to connect the three.\nImagine a virtual L1 interface via HTTP.\n\nThis allows a simple web browser (HTML 5) to forward data between two or more L2 \ninterfaces. The initial use case for this application was as a mobile device \ntethering solution, where no code execution (aside from JavaScript) on the mobile \ndevice is possible.\n\n== Requirements ==\n- OS X or Linux, with the appropriate tuntap driver installed\n- Python CherryPy version \u003e= 3.2.2\n- Python ws4py module (https://github.com/Lawouach/WebSocket-for-Python)\n- Python PyCrypto if encryption is enabled\n\n== Explaination ==\nThe application works by creating a tap interface, and starting a WebSocket server,\nthen opening the tap interface for reading/writing. Only, data read from the tap is \nforwarded via an HTML 5 WebSocket, and data read from the WebSocket is written to the \ntap.\n\nUsing the application's web interface as a WebSocket client, and the included \nJavaScript routine, data is broadcasted between one or more WebSockets. Imagine the \nweb interface as a virtual hardware device. By connecting to additional Gelf \nWebSocket servers, you are 'attaching' network links to device.\n\n== How to ==\nOn the first server (server1) run:\n1) server1$ sudo python ./gelf.py --host 0.0.0.0 7001\n\nOn the second server (server2) run:\n2) server2$ sudo python ./gelf.py --host 0.0.0.0 7001\n\nIn a web browser that has access to both servers open either's web interface\n3) http://server1:7001\nThen add server2:7001 as a second WS using the web interface.\n\nOptional:\n4) server1$ sudo ifconfig tap0 10.3.2.1\n5) server2$ sudo ifconfig tap0 10.3.2.2\n6) server1$ sudo route add default gw 10.3.2.2\n\n== Encryption ==\nYou can provide a 128bit symmetric encryption key to encrypt L2 traffic using the\n[--key] switch followed by a hex-encoded 16 byte key. You can let Gelf (and your OS)\nchoose the key for you using the [--enc] switch without a [--key], on the first link.\nYou'll need to use the generated key on additional links. \n \nTo symmetrically encrypt data between L2 interfaces use the following example:\n1) server1$ sudo python ./gelf.py --host 0.0.0.0 --enc 7001\nEncryption key: b04c96f0e62fd14424e7e58e3d8ba957\n[...]\n\n2) server2$ sudo python ./gelf.py --host 0.0.0.0 \\\n  --key b04c96f0e62fd14424e7e58e3d8ba957 7001\n\n== To do ==\n- Find an optimization for MTU (which is actually the read buffer from the \n  interface). Gelf does not set the actual MTU for the created tap device. \n  Finding an optimal buffer size (accounting for HTTP headers, and the L1 \n  forwarding header) will speed up tranfers.\n- Clean up tear-down code\n- Create a cleaner web interface\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheopolis%2Fgelf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheopolis%2Fgelf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheopolis%2Fgelf/lists"}