{"id":20209151,"url":"https://github.com/refraction-networking/conjure","last_synced_at":"2025-04-15T18:32:51.913Z","repository":{"id":37900437,"uuid":"259403145","full_name":"refraction-networking/conjure","owner":"refraction-networking","description":"Conjure Refraction Networking station code","archived":false,"fork":false,"pushed_at":"2025-04-09T22:20:40.000Z","size":8151,"stargazers_count":73,"open_issues_count":52,"forks_count":23,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-09T23:25:39.466Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://refraction.network","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refraction-networking.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":"2020-04-27T17:26:48.000Z","updated_at":"2025-04-09T22:20:44.000Z","dependencies_parsed_at":"2023-10-03T08:41:47.960Z","dependency_job_id":"e0cf152a-3d06-4856-aed2-fa133b520eec","html_url":"https://github.com/refraction-networking/conjure","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refraction-networking%2Fconjure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refraction-networking%2Fconjure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refraction-networking%2Fconjure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refraction-networking%2Fconjure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refraction-networking","download_url":"https://codeload.github.com/refraction-networking/conjure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249129237,"owners_count":21217312,"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-11-14T05:39:02.127Z","updated_at":"2025-04-15T18:32:51.888Z","avatar_url":"https://github.com/refraction-networking.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://refraction.network\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/5443147/30133006-7c3019f4-930f-11e7-9f60-3df45ee13d9d.png\" alt=\"refract\"\u003e\u003c/a\u003e\n\u003ch1 class=\"header-title\" align=\"center\"\u003eConjure Refraction Station\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eRefraction Networking is a free-to-use anti-censorship technology, that places proxies at Internet Service Providers, so they are harder to block. This repository implements the conjure stations system including various registration channels, transport protocols, and configuration options.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/refraction-networking/conjure/actions/workflows/build.yml\"\u003e\u003cimg src=\"https://github.com/refraction-networking/conjure/actions/workflows/build.yml/badge.svg\"\u003e\u003c/a\u003e\n\u003c!-- \u003ca href=\"https://godoc.org/github.com/refraction-networking/conjure/\"\u003e\u003cimg src=\"https://img.shields.io/badge/godoc-reference-blue.svg\"\u003e\u003c/a\u003e --\u003e\n\u003ca href=\"https://goreportcard.com/report/github.com/refraction-networking/conjure\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/refraction-networking/conjure\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### See also\n\n[Refraction Client Library](https://github.com/refraction-networking/gotapdance) -\npure golang client library for connecting to refraction systems. Implements BOTH\nconjure and tapdance.\n\n[Tapdance Station](https://github.com/refraction-networking/tapdance) - Tapdance\nstation code implementing the previous iteration of refraction networking development.\n\n## Install\n\nThis is an abridged install and configuration process, for expanded install instructions,\nconfiguration options, or multi-station deployments see [the wiki](https://github.com/refraction-networking/conjure/wiki).\n\n### Requirements\n\nBuilding the station requires both go and rust:\n\n- [Install Golang](https://golang.org/doc/install)\n\n- [Install Rust](https://www.rust-lang.org/tools/install)\n\n**Install packages and go libraries**\n\n```sh\nsudo apt install  wget git make gcc bison flex protobuf-compiler curl libssl-dev pkg-config libgmp3-dev libzmq3-dev\ngo get -d -u -t github.com/refraction-networking/gotapdance/...\n```\n\n**Install PF_RING**\n\n1. [Install from Package](https://github.com/refraction-networking/conjure/wiki/PF_RING#from-packages)\n\n2. [Install From Git / Source](https://github.com/refraction-networking/conjure/wiki/PF_RING#from-source)\n    - if installing from git / source make the zbalance_ipc executable, and ensure that it is available through your `$PATH`.\n\n### Build the station\n\n```sh\nmake\n\n## future\n# sudo make install\n```\n\n### Configure\n\nThe layout of configuration expected by the default layout of a production server is:\n\n```sh\n## Station specific configuration and files go in /var/lib/conjure\n$ tree /var/lib/conjure/\n/var/lib/conjure/\n├── app_config.toml\n├── ClientConf      # if running the registration server locally\n├── conjure.conf\n├── phantom_subnets.toml\n├── privkey\n├── pubkey\n└── reg_config.toml # if running the registration server locally\n\n## Scripts, executables, and the default environment script (conjure.conf) go in /opt/conjure\n$ tree /opt/conjure/\n/opt/conjure/\n├── bin\n│   ├── application\n│   ├── conjure\n│   └── registration_server  # if running the registration server locally\n├── on-reboot.sh\n├── scripts\n│   ├── install_pfring.sh\n│   ├── start_application.sh\n│   ├── start_detector.sh\n│   ├── start_registrar.sh\n│   └── start_zbalance_ipc.sh\n└── sysconfig\n    └── conjure.conf    # Expected by systemd services, applies overrides from /var/lib/conjure/conjure.conf\n```\n\nTo run a station configuration modifications are required. This section outlines\nsome minimal changes, for more configuration options see the [wiki configuration page](https://github.com/refraction-networking/conjure/wiki/Configuration).\n\n1. Define global paths, core usage, and pf_ring parameters in `sysconfig/conjure.conf`\n\n    ```conf\n    # ============[ REQUIRED ]============\n    # The interface(s) which PF_RING Zero Copy will tap.\n    CJ_IFACE=\"zc:enp179s0f0,zc:enp179s0f1\"\n\n    Public addresses that of non-tap interface - used for kernel DNAT\n    IP4_ADDR=\"\u003cPUBLIC_STATION_V4_ADDRESS\u003e\"\n    IP6_ADDR=\"\u003cPUBLIC_STATION_V6_ADDRESS\u003e\"\n\n    ```\n\n    Note: ipv6 in disabled by default. To enable IPv6 modify\n    `application/config.toml`\n\n    ```diff\n    # Allow the station to opt out of either version of internet protocol to limit a\n    # station to handling one or the other. For example, v6 on small station deployment\n    # with only v6 phantom subnet,  v4 only on station with no puvlic v6 address.\n    enable_v4 = true\n    -enable_v6 = false\n    +enable_v6 = true\n    ```\n\n2. Define application parameters in `application/app_config.toml`\n\n    ```toml\n    # ============[ REQUIRED ]============\n    ## Detector\n    [[connect_sockets]]\n\n    address = \"ipc://@detector\"\n    type = \"NULL\"\n\n    ```\n\n3. Define the phantom subnet generations that will be supported (this can be\nupdated going forward with new generations) in `sysconfig/phantom_subnets.toml`\n\n    ```toml\n    [Networks]\n        [Networks.1]\n            Generation = 1\n            [[Networks.1.WeightedSubnets]]\n                Weight = 9\n                Subnets = [\"192.122.190.0/24\", \"2001:0123:4567:89ab::/64\"]\n\n        [Networks.2]\n            Generation = 2\n            [[Networks.2.WeightedSubnets]]\n                Weight = 9\n                Subnets = [\"192.0.0.0/24\", \"2001:0123:4567:89ab::/64\"]\n            [[Networks.2.WeightedSubnets]]\n                Weight = 1\n                Subnets = [\"2001:0123:4567:89ab::/96\"]\n    ```\n\n### Setup\n\nConjure relies on the kernel to handle provide DNAT to establish these rules we\nneed to configure and run the environment configuration script.\n\nAfter defining `IP4_ADDR`, `IP6_ADDR`, and core usage parameters in the\n`conjure.conf` file run the `on-reboot.sh` script to initialize all required\ninterfaces and rules.\n\n```sh\n./on-reboot.sh\n```\n\nGenerate station keys using the libtapdance tools\n\n```ssh\ncd libtapdance \u0026\u0026 make genkey\n./libtapdance/genkey\nmv libtapdance/{priv,pub}key sysconfig/\n```\n\n### Run\n\nCopy (or link) the systemd service configurations to the appropriate location\n\n```sh\nsudo cp sysconfig/*.service /etc/systemd/system/\nsudo systemctl enable zbalance\nsudo systemctl enable conjure-app\nsudo systemctl enable conjure-det\n\n# if enabling and supporting registration server or multi-station registration sharing\nsudo systemctl enable conjure-registration-server\n```\n\nStart the station.\n\n```sh\n# zbalance has to be first or the detector will throw an error\nsystemctl start zbalance\n\n# Next start the detector and station application processes\nsystemctl start conjure-det\nsystemctl start conjure-app\n\n# if enabling and supporting registration server or multi-station registration sharing\nsystemctl start conjure-registration-server\n```\n\n## [FAQ](https://github.com/refraction-networking/conjure/wiki/FAQ) | [WIKI](https://github.com/refraction-networking/conjure/wiki)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefraction-networking%2Fconjure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefraction-networking%2Fconjure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefraction-networking%2Fconjure/lists"}