This relates to any similar development environment. This guide will help you setup your device to work for your development setup either locally or a remote server. No root required.
First I will describe the use case scenario where this is useful:
Staging / Test:
(static desktop ip)
You’ll notice for each setup I have created pastebin links to where my hosts file is located, the format is “ip hostname” with one per line, just like a windows /etc/hosts file. You will need this in a later step for access to your settings. If you have a web server for static links, that will be even better but optional, I use http://somewebsite.com/dns-settings/live.txt. This allows me to edit without updating my android device.
Step 1 - Basic application settings:
- Download (Daedalus) and open the application.
- Click on the menu then click “Servers”
- Click the add button and add the two google servers “184.108.40.206” and “220.127.116.11”, You can substitute these for your preferred DNS provider as well.
- Activate these dns servers in the menu by clicking on “Settings”
- Then select Google and Google 2 from the settings. Also activate Advance settings and select the two following options in the image below
Step 2 - Creating hosts files:
- If you do not have your own server, you can use pastebin.com to host your hosts files for use in the next steps.
- Create a pastebin link for each mode, you can add as many hosts as you need to test like below. Then hit “Create New Paste”
- Click on the Raw button and copy this link somewhere for later use, Repeat steps for each mode.
Step 3 - Setting up the rules:
- Back to the menu now, Click on “Rules”.
- Add a new rule for each development mode, Live, staging, dev. Filename is not crucial, just make something up.
- Hit sync rule before leaving to make sure the file is downloaded.
Step 4 - Activating:
- Tap and activate the mode you wish to be in, You can activate more than one at a time so be careful as this will override one or the other.
- In the menu go to home, and hit the “Activate” button.
Step 5 - Testing:
- The final setup, lets see if I am hitting my dev server.
- As you can see in the app below, the short url is no longer short, I now get a full url as the dev server doesnt have an api key to tra.li link shortener.
- Depending on the use-case it may be difficult to detect which server your hitting, You can go back into Daedalus in the menu and select test. Type your domain name and see if the ip matches your dev server.