diff --git a/development-101.md b/development-101.md index e1ae0b8..333c68f 100644 --- a/development-101.md +++ b/development-101.md @@ -41,3 +41,28 @@ There are a few exceptions to this convention: Additionally we sometimes also use interfaces within packages. It can help establishing a clearer separation of concerns and easier testing when there's complex interaction between classes. + +## Running multiple versions of Briar on a single device + +Running two versions of Briar side by side on one device does not work out +of the box. For example it is not possible to run the released version and +the development version at the same time; only one of both will be online. +The reason is that the both versions are trying to use the same hard-coded +Tor ports to create their hidden service, which doesn't work. The solution +is to use different ports on the development versions. To do so, change the +following: + +In `bramble-api/src/main/java/org/briarproject/bramble/api/plugin/TorConstants.java`: + + - int SOCKS_PORT = 59050; + - int CONTROL_PORT = 59051; + + int SOCKS_PORT = 59060; + + int CONTROL_PORT = 59061; + +In `bramble-core/src/main/resources/torrc`: + + - ControlPort 59051 + + ControlPort 59061 + ... + - SocksPort 59050 + + SocksPort 59060