Skip to content
Snippets Groups Projects
Verified Commit b13f5f04 authored by meskio's avatar meskio :mountain_snow:
Browse files

Document how to set up a dev environment

* Closes: #131
parent 627696fa
No related branches found
No related tags found
1 merge request!154Generate fake descriptors to help development
......@@ -2,7 +2,9 @@ descriptors:
go run scripts/mkdescriptors/main.go descriptors
build:
CGO_ENABLED=0 go build ./cmd/*
CGO_ENABLED=0 go build ./cmd/backend
CGO_ENABLED=0 go build ./cmd/distributors
CGO_ENABLED=0 go build ./cmd/updaters
translations:
@goi18n extract -format json -outdir pkg/locales
......@@ -14,27 +14,28 @@ Rdsys supersedes
Functionality-wise, rdsys and BridgeDB overlap but rdsys is neither a subset
nor a superset of BridgeDB's functionality.
Installation
============
Usage
=====
1. Compile the backend executable:
1. Compile everything:
go build -o rdsys-backend cmd/backend/main.go
make build
1. Compile the distributors executable:
2. Generate fake bridge descriptors:
go build -o rdsys-distributor cmd/distributors/main.go
make descriptors
Usage
=====
3. Start the backend by running:
./backend -config conf/config.json
1. Start the backend by running:
4. Start a distributor, which distributes the backend's resources:
./rdsys-backend -config /path/to/config.json
./distributor -name moat -config conf/config.json
2. Start a distributor, which distributes the backend's resources:
5. Get some bridges:
./rdsys-distributor -name salmon -config /path/to/config.json
curl http://127.0.0.1:7500/moat/circumvention/defaults |jq
More documentation
==================
......
{
"by": {
"settings": [
{"bridges": {"type": "obfs4", "source": "builtin"}},
{"bridges": {"type": "vanilla", "source": "bridgedb"}},
{"bridges": {"type": "obfs4", "source": "bridgedb"}},
{"bridges": {"type": "snowflake", "source": "builtin"}}
]
},
"cn": {
"settings": [
{"bridges": {"type": "snowflake", "source": "builtin"}},
{"bridges": {"type": "obfs4", "source": "bridgedb"}}
]
},
"ir": {
"settings": [
{"bridges": {"type": "snowflake", "source": "builtin"}},
{"bridges": {"type": "obfs4", "source": "bridgedb"}}
]
},
"ru": {
"settings": [
{"bridges": {"type": "obfs4", "source": "bridgedb"}},
{"bridges": {"type": "snowflake", "source": "builtin"}}
]
},
"hk": {
"settings": [
{"bridges": {"type": "obfs4", "source": "bridgedb"}},
{"bridges": {"type": "snowflake", "source": "builtin"}}
]
}
}
{
"settings": [
{"bridges": {"type": "obfs4", "source": "builtin"}},
{"bridges": {"type": "obfs4", "source": "bridgedb"}},
{"bridges": {"type": "snowflake", "source": "builtin"}}
]
}
......@@ -47,8 +47,7 @@
},
"distribution_proportions": {
"https": 1,
"salmon": 5,
"stub": 3
"settings": 5
}
},
"distributors": {
......@@ -107,8 +106,8 @@
],
"geoipdb": "/usr/share/tor/geoip",
"geoip6db": "/usr/share/tor/geoip6",
"circumvention_map": "circumvention.json",
"circumvention_defaults": "circumvention_defaults.json",
"circumvention_map": "conf/circumvention.json",
"circumvention_defaults": "conf/circumvention_defaults.json",
"num_bridges_per_request": 3,
"rotation_period_hours": 24,
"num_periods": 30,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment