What?
Use a local Web Control served by the client.
Why?
- Want to use Safari
- Want to use Firefox with remote peers (FAH v8.1)
- Have problems with https://app.foldingathome.org or https://beta.foldingathome.org
- Want to use mobile (phone/tablet) browser (FAH < v8.3)
- Must be manually updated
- Insecure if allowing remote control direct connection
Prerequisites
- Administrator account so you can use sudo
- Comfortable using the command line in Terminal
NOTE
If using v8.2.4 or later, skip down to
viewtopic.php?p=363144#p363144
Create/Edit config.xml on local client computer
macOS
Code: Select all
sudo /usr/bin/nano "/Library/Application Support/FAHClient/config.xml"
Update: for v8.3.x, the path is /etc/fah-client/config.xml
Code: Select all
sudo /usr/bin/mkdir -p /etc/fahclient
sudo /usr/bin/nano /etc/fahclient/config.xml
Code: Select all
<config>
</config>
Allow localhost origin and set web-root in config.xml
Code: Select all
<allowed-origins v='https://app.foldingathome.org http://localhost:7396'/>
<web-root v='fah-web-control/dist'/>
Download and install pre-built Web Control
macOS
Code: Select all
cd /tmp
curl -fLO https://download.foldingathome.org/releases/beta/fah-web-control/macos-12-universal/release/latest.tar.bz2
tar -xf latest.tar.bz2
mv fah-web-control_* fah-web-control
sudo /bin/mv fah-web-control "/Library/Application Support/FAHClient/."
rm latest.tar.bz2
Code: Select all
cd /tmp
wget https://download.foldingathome.org/releases/beta/fah-web-control/macos-12-universal/release/latest.tar.bz2
tar -xf latest.tar.bz2
mv fah-web-control_* fah-web-control
sudo /usr/bin/mv fah-web-control /var/lib/fah-client/.
rm latest.tar.bz2
Optional: Hack local Web Control for mobile browsers
You do not need this if you can pair a keyboard to your mobile device and type control-shift-L when Web Control is open, but you do need to allow remote control.
In the future, you will not need a hacked local Web Control to use a mobile browser.
Note that the Web Control layout is not mobile-optimized.
Landscape orientation generally works better.
Allow remote control of local client
WARNING: This is a security risk. See link for details.
If you haven't already, copy-paste these lines in config.xml after <config>
Code: Select all
<http-addresses v='0.0.0.0:7396'/>
<allow v='127.0.0.1 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12 169.254.0.0/16'/>
<deny v='0/0'/>
Add hostname as an allowed origin to config.xml
Replace my-computer wherever it appears in this document with output of command hostname. Use lowercase.
Code: Select all
<allowed-origins v='https://app.foldingathome.org http://localhost:7396 http://my-computer.local:7396'/>
Edit Web Control JavaScript
This will not be needed for v8.1.19 and later.
macOS
Code: Select all
cd "/Library/Application Support/FAHClient"
cd fah-web-control/dist/assets
open -a TextEdit.app index.*.js
Code: Select all
cd /var/lib/fah-client
cd fah-web-control/dist/assets
nano index.*.js
In two places, replace
Code: Select all
getItem("client-host")||"127.0.0.1"
Code: Select all
getItem("client-host")||"my-computer.local"
Restart client
macOS
Code: Select all
sudo /bin/launchctl stop org.foldingathome.fahclient
sudo /bin/launchctl start org.foldingathome.fahclient
Code: Select all
sudo /usr/bin/systemctl restart fah-client
Enjoy
To access local Web Control, open
http://localhost:7396
For mobile browser option, open
http://my-computer.local:7396
Option: Build Web Control
Install build tools - macOS
Install homebrew from https://brew.sh
Follow any instructions given at end of homebrew install.
Install npm
Code: Select all
brew install npm vite
Install build tools - Linux
Code: Select all
sudo apt install -y npm vite
Clone Web Control from GitHub
Code: Select all
cd ~
git clone -b v8.1.18 https://github.com/FoldingAtHome/fah-web-client-bastet.git
Build Web Control and move to client directory
Code: Select all
cd ~/fah-web-client-bastet
npm install
npm run build
cd ..
mv fah-web-client-bastet fah-web-control
Code: Select all
sudo /bin/mv fah-web-control "/Library/Application Support/FAHClient/."
Code: Select all
sudo /usr/bin/mv fah-web-control /var/lib/fah-client/.