This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Circuit Relay #1063
Merged
Merged
feat: Circuit Relay #1063
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
58e0863
docs: adding circuit relay tutorial (wip)
dryajov 448cf0e
wip
dryajov 7c03194
(wip) relay tutorial improvements
dryajov c31be9b
test: rework with new ipfsd-ctl
dryajov e3ba300
feat: add circuit test
dryajov 2376246
feat: name circuit relay test
dryajov c01a979
docs: adding circuit docs
dryajov b3d71c2
docs: adding circuit relay tutorial (wip)
dryajov 7de9de2
feat: latest libp2p + other deps. Fix bugs in tests along the way
daviddias 11e3b4f
tutorial
dryajov 5dbe97c
tutorial lint
dryajov 8af1f78
feat: read relay config from options and config file
dryajov 64fc128
docs: tutorial
dryajov 9973578
docs: clarifying specific relay addrs
dryajov 2425ae4
docs: more clarifications
dryajov 0483091
docs: more clarifications
dryajov 1fa52f8
docs: more clarifications
dryajov 80a0b7d
docs: changes based on robs review
dryajov 3b47e5d
Add minor grammar/spelling fixes to relay doc
Mr0grog e0edd66
docs: small change
dryajov d1b0180
docs: expanded closing section
dryajov c9705b1
docs: more suggestions from Mr0grog
dryajov 5cee7e6
docs: more improvements and typos
dryajov 1a99d65
doc: minor corrections
dryajov 4dba67c
Revert "docs: adding circuit relay tutorial (wip)"
dryajov 9f51067
wip
dryajov f265445
docs: tutorial fixes
dryajov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
.vscode/ |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<title>IPFS simple messaging</title> | ||
<meta name="description" content="Simple chat app on ipfs"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<link rel="stylesheet" href="./main.css"> | ||
|
||
<body> | ||
<header> | ||
<h1>IPFS Simple Messaging</h1> | ||
</header> | ||
<main> | ||
<div class="columns box"> | ||
<div class="row"> | ||
<div class="box"> | ||
<label>Room (double click to change):</label> | ||
<span id="room"></span> | ||
<input type="text" id="room-id" style="display: none"> | ||
</div> | ||
<div class="box msgs-box"> | ||
<ul id="msgs"></ul> | ||
</div> | ||
<div> | ||
<label>message:</label> | ||
<input type="text" id="message"></input> | ||
<button id="send">Send</button> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="box peers-box"> | ||
<label>Peers Joined Room:</label> | ||
<ul id="peers"></ul> | ||
</div> | ||
<div class="box peers-box"> | ||
<label>Peers Connected:</label> | ||
<ul id="peers-addrs"></ul> | ||
</div> | ||
<div> | ||
<label>Connect to Peer:</label> | ||
<input type="text" id="peer"></input> | ||
<button id="connect">Connect</button> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="box row"> | ||
<label>Peer id:</label> | ||
<ul id="peer-id"></ul> | ||
</div> | ||
<div class="box addrs-box"> | ||
<label>Addresses:</label> | ||
<ul id="addrs"></ul> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
<script src="src/app.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
height: 100%; | ||
} | ||
|
||
body { | ||
font-family: sans-serif; | ||
color: white; | ||
background: linear-gradient(to bottom, #041727 0%, #062b3f 100%); | ||
pointer-events: auto; | ||
} | ||
|
||
h1, | ||
h2, | ||
h3 { | ||
margin: 0; | ||
} | ||
|
||
h1 { | ||
font-size: 2em; | ||
font-weight: 300; | ||
} | ||
|
||
h2 { | ||
font-size: 1.25em; | ||
font-weight: 700; | ||
} | ||
|
||
h3 { | ||
font-size: 1.0em; | ||
font-weight: 700; | ||
} | ||
|
||
main, | ||
header { | ||
filter: none; | ||
} | ||
|
||
.dragover-popup { | ||
position: fixed; | ||
top: 0.5em; | ||
left: 0.5em; | ||
width: calc(100% - 1em); | ||
height: calc(100% - 1em); | ||
background-color: rgba(0, 0, 0, 0.5); | ||
display: none; | ||
pointer-events: none; | ||
} | ||
|
||
.dragover-popup h1 { | ||
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%) | ||
} | ||
|
||
body.dragging main, | ||
body.dragging header { | ||
filter: blur(5px); | ||
} | ||
|
||
body.dragging .dragover-popup { | ||
display: block; | ||
} | ||
|
||
header { | ||
text-align: center; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 3em 0; | ||
} | ||
|
||
ul { | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
} | ||
|
||
ul li { | ||
margin: 1em 0; | ||
font-size: 1em; | ||
font-family: monospace; | ||
word-wrap: break-word; | ||
} | ||
|
||
button { | ||
background-color: rgba(0, 0, 0, 0.2); | ||
color: #6acad1; | ||
border: 2px solid #6acad1; | ||
font-size: 1em; | ||
padding: 0.625em 1.5em; | ||
border-radius: 0.125em; | ||
margin: .5em 0; | ||
} | ||
|
||
button.full { | ||
margin-right: 0; | ||
margin-left: 0; | ||
width: 100%; | ||
} | ||
|
||
button:hover { | ||
color: white; | ||
border: 2px solid white; | ||
cursor: pointer; | ||
} | ||
|
||
.address { | ||
font-family: monospace | ||
} | ||
|
||
.disabled *, | ||
input:disabled, | ||
button:disabled { | ||
opacity: 0.2; | ||
} | ||
|
||
input { | ||
width: 100%; | ||
border: 2px solid rgba(0, 0, 0, 0.2); | ||
color: black; | ||
padding: 0.7em; | ||
border-radius: 2px; | ||
} | ||
|
||
input:hover, | ||
input:focus, | ||
input:active { | ||
border-color: #6acad1; | ||
} | ||
|
||
input, | ||
button { | ||
outline: none; | ||
} | ||
|
||
main { | ||
width: 90%; | ||
margin: 0 auto; | ||
} | ||
|
||
.buttons, | ||
.columns { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
height: 100%; | ||
} | ||
|
||
.msgs-box { | ||
flex: 1 1 0px; | ||
overflow-y: scroll; | ||
min-height: 250px; | ||
} | ||
|
||
.peers-box { | ||
flex: 1 1 0px; | ||
overflow-y: scroll; | ||
min-height: 182px; | ||
} | ||
|
||
.addrs-box { | ||
flex: 1; | ||
overflow-y: scroll; | ||
max-height: 273px; | ||
} | ||
|
||
.row { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.buttons>button, | ||
.columns>div { | ||
width: calc(33% - 0.5em); | ||
} | ||
|
||
.buttons>button { | ||
margin: 0 0 1em; | ||
} | ||
|
||
.box { | ||
background-color: rgba(255, 255, 255, 0.05); | ||
padding: 1em; | ||
margin-bottom: 1em; | ||
} | ||
|
||
.box>h2 { | ||
display: block; | ||
border-bottom: 2px solid rgba(255, 255, 255, 0.1); | ||
border-right: 0; | ||
border-left: 0; | ||
text-align: center; | ||
padding-bottom: 0.5em; | ||
margin-bottom: 1em; | ||
} | ||
|
||
.errors { | ||
grid-area: errors; | ||
color: red; | ||
font-style: italic; | ||
font-size: 1.125em; | ||
display: block; | ||
margin: 0 0 1em; | ||
} | ||
|
||
.errors.hidden { | ||
display: none; | ||
} | ||
|
||
table { | ||
width: 100%; | ||
margin: 1em 0; | ||
word-break: break-all; | ||
border-collapse: collapse; | ||
} | ||
|
||
table thead { | ||
background-color: rgba(255, 255, 255, 0.1); | ||
font-weight: normal | ||
} | ||
|
||
table th, | ||
table td { | ||
padding: 0.5em 0; | ||
} | ||
|
||
table td:last-child, | ||
table th:last-child { | ||
width: 20%; | ||
text-align: center; | ||
} | ||
|
||
table td:first-child { | ||
width: 45%; | ||
} | ||
|
||
table td:nth-child(2) { | ||
width: 35%; | ||
font-family: monospace; | ||
} | ||
|
||
table tr:hover { | ||
background-color: rgba(0, 0, 0, 0.2) | ||
} | ||
|
||
table a { | ||
color: inherit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "ipfs-quick-msg", | ||
"version": "0.0.1", | ||
"description": "IPFS quick msg", | ||
"main": "index.js", | ||
"scripts": { | ||
"clean": "rm -rf dist/*", | ||
"build": "parcel build index.html --public-url '.'", | ||
"start": "parcel index.html", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"deploy": "ipfs add -r --quieter dist", | ||
"lint": "aegir lint" | ||
}, | ||
"author": "Dmitriy Ryajov <dryajov@gmail.com>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"ipfs": "file:../../", | ||
"ipfs-pubsub-room": "~0.3.0" | ||
}, | ||
"devDependencies": { | ||
"aegir": "^13.0.5", | ||
"http-server": "^0.10.0", | ||
"ipfs-css": "^0.2.0", | ||
"parcel-bundler": "^1.6.2", | ||
"tachyons": "^4.9.1" | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍