Skip to content

Commit 504e473

Browse files
authored
Merge pull request #1151 from urbit/tlat/develop
Bridge December update: v3.3.0
2 parents 6867b78 + 4c4ae1c commit 504e473

21 files changed

+37979
-12830
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# misc
1313
.DS_Store
14+
.env
1415
.env.local
1516
.env.development.local
1617
.env.test.local
@@ -28,3 +29,4 @@ bridge*.tar.gz
2829
checksums.txt
2930

3031
*.pem
32+
localhost+2*

DEVELOPMENT.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,41 @@ of having to re-authenticate whenever you make a change or refresh the page):
8080

8181
## HTTPS
8282

83-
For development, you can enable HTTPS on localhost without a certificate for
84-
Chrome by pasting the following into the URL bar:
83+
For development, Bridge will not run unless you access localhost via HTTPS. To do this, you will want to set up a self-signed cert using `mkcert`:
8584

85+
1. Install `mkcert`:
8686
```
87-
chrome://flags/#allow-insecure-localhost
87+
# on MacOS using homebrew
88+
brew install mkcert
89+
90+
# on Linux using apt # TODO Confirm functionality
91+
sudo apt install libnss3-tools
92+
wget -O mkcert https://github.com/FiloSottile/mkcert/releases/latest/download/mkcert-v*-linux-amd64
93+
chmod +x mkcert
94+
sudo mv mkcert /usr/local/bin/
8895
```
8996

90-
In Firefox, you may need to allow connecting to the unsecured local node
91-
websocket. Do this by going to `about:config` and setting the
92-
`network.websocket.allowInsecureFromHTTPS` flag to `true`.
97+
2. Create certificate authority:
98+
```
99+
# install local cert authority
100+
mkcert -install
101+
```
102+
103+
3. Generate localhost Cert:
104+
```
105+
# Navigate to your bridge project directory
106+
cd /path/to/urbit/bridge
107+
108+
# Generate certificate for localhost
109+
mkcert localhost 127.0.0.1 ::1
110+
```
93111

94-
Additionally you need to run with the `HTTPS` environment variable set to
95-
`true`. Note that `npm run pilot` will handle this automatically.
112+
This creates two files:
113+
- `localhost+2.pem` (certificate)
114+
- `localhost+2-key.pem` (private key)
115+
116+
117+
Note: as of 3.3.0, Bridge is deprecating explicit support for Firefox. Privacy focused users are recommended to use Brave Browser.
96118

97119
## WalletConnect
98120

@@ -178,14 +200,18 @@ Start a local fake ship from the master branch in the [urbit repo](https://githu
178200
:: Run these in the dojo:
179201
::
180202
> |mount /=base=
181-
> :azimuth %resub
203+
> |nuke %azimuth
204+
> |rein %base [%.y %azimuth]
182205
> :azimuth|watch 'http://0.0.0.0:8545' %local
206+
> :azimuth %resub
183207
> :azimuth &azimuth-poke [%kick ~]
184208
> |rein %base [& %roller] [& %roller-rpc] [& %azimuth-rpc]
185209
> :roller|local
186210
> :roller|setkey '58d62eb79797502bc0f66cd3e7a49d00287bff53a2734b799ef09cb746340ed0'
187211
> :roller|quota 9.999
188-
> |cors-approve 'https://127.0.0.1:3000'
212+
:: If you run into issues, also add 'https://localhost:3000' the the eyre CORS approvals
213+
> |eyre/cors/approve 'https://127.0.0.1:3000'
214+
::
189215
:: Once L2 txs have been sent via Bridge, this will manually commit and batch them, avoiding waiting for the timer
190216
::
191217
> :roller|commit

0 commit comments

Comments
 (0)