{"id":17062544,"url":"https://github.com/skateman/silvio","last_synced_at":"2025-04-12T18:13:29.458Z","repository":{"id":87120601,"uuid":"163203334","full_name":"skateman/silvio","owner":"skateman","description":"VPN-over-WebSocket","archived":false,"fork":false,"pushed_at":"2018-12-31T20:09:09.000Z","size":50,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:13:22.270Z","etag":null,"topics":["crystal","networking","tun","vpn","websockets"],"latest_commit_sha":null,"homepage":null,"language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skateman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-26T17:38:10.000Z","updated_at":"2025-04-05T19:06:28.000Z","dependencies_parsed_at":"2023-06-19T18:23:06.133Z","dependency_job_id":null,"html_url":"https://github.com/skateman/silvio","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skateman%2Fsilvio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skateman%2Fsilvio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skateman%2Fsilvio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skateman%2Fsilvio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skateman","download_url":"https://codeload.github.com/skateman/silvio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610341,"owners_count":21132919,"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":["crystal","networking","tun","vpn","websockets"],"created_at":"2024-10-14T10:50:11.777Z","updated_at":"2025-04-12T18:13:29.432Z","avatar_url":"https://github.com/skateman.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# silvio\n[![Build Status](https://travis-ci.org/skateman/silvio.svg?branch=master)](https://travis-ci.org/skateman/silvio)\n\nSilvio is a VPN-over-WebSocket implementation, based on the TUN interface. I am using it to connect all my devices to a single virtual network through a web service. According to [Wikpiedia](https://en.wikipedia.org/wiki/Silvio_Pellico), Silvio (Pellico) was an Italian writer, poet, dramatist and patriot active in the Italian unification. I spent some time of my life on a street that was named after him.\n\n## Installation\n\nThe code is written in Crystal and uses PostgreSQL to store the information about the networks and clients You can build the server and the client using following command:\n```sh\nshards build\n```\n\n## Usage\n\n### Server\n\nThe server requires an empty PostgreSQL database it can be started with the following command:\n```\nbin/silvio-server -d postgres://user:pass@host:port/db\n```\nThe server by default listens on `0.0.0.0:8090`, you can get more information about how to tweak this if you pass the `--help` argument. Defining clients and networks is possible through the REST API:\n\n```json\n# POST /networks\n{\n  \"name\": \"test-net\",\n  \"address\": \"192.168.10.0\",\n  \"netmask\": \"255.255.255.0\"\n}\n\n# POST /networks/1/clients\n{\n  \"name\": \"test-client\",\n  \"address\": \"192.168.10.1\"\n}\n```\n\n### Client\n\nThe client uses TUN as the virtual network interface so it needs to run as a privileged user. There are two required arguments, the URL pointing to the server and a unique token stored in the database:\n```sh\nbin/silvio-client ws://\u003chost\u003e:\u003cport\u003e \u003ctoken\u003e\n```\n\n## Development\n\nAfter cloning the repository, you can install the dependencies by running `shards` and `bundle`. There are no unit tests, if they become available you will be able to run them using `crystal spec`. There is a high-level test in `spec/ping/test-server.sh` that requires `docker` and tests if two clients can ping each other.\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/skateman/silvio/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\nHere are some ideas for contributions:\n* Storing IP addresses as numbers instead of strings\n* Optional traffic routing to the Internet (SOCKS-like)\n* Support for IPv6\n* Authentication for the REST API\n* Static frontend for the REST API\n* Load-balancing between multiple instances\n* Tests, tests and tests\n* OpenShift template\n* Support for Windows and OSX\n\n## License\n\nThis project is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskateman%2Fsilvio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskateman%2Fsilvio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskateman%2Fsilvio/lists"}