Skip to content

Commit 139b570

Browse files
committed
Initialize hyperproxy lerna project
1 parent 976058b commit 139b570

35 files changed

+2165
-1866
lines changed

.github/ISSUE_TEMPLATE.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!---
2+
Thanks for filing an issue 😄 ! Before you submit, please read the following:
3+
4+
Search open/closed issues before submitting since someone might have asked the same thing before!
5+
6+
Issues on GitHub are only related to problems of Arbiter itself and we cannot answer
7+
support questions here.
8+
-->
9+
10+
Choose one: is this a bug report or feature request?
11+
12+
<!--- Provide a general summary of the issue in the title above -->
13+
14+
### Input Code
15+
<!--- If you're describing a bug, please let us know which sample code reproduces your problem -->
16+
17+
```js
18+
const your => (code) => here;
19+
```
20+
21+
### Expected Behavior
22+
<!--- If you're describing a bug, tell us what should happen -->
23+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
24+
25+
### Current Behavior
26+
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
27+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
28+
29+
### Possible Solution
30+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
31+
<!--- or ideas how to implement the addition or change -->
32+
33+
### Context
34+
<!--- How has this issue affected you? What are you trying to accomplish? -->
35+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
36+
37+
### Your Environment
38+
<!--- Include as many relevant details about the environment you experienced the bug in -->
39+
40+
| software | version(s)
41+
| ---------------- | -------
42+
| node |
43+
| npm |
44+
| Operating System |

.github/PULL_REQUEST_TEMPLATE.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
Before making a PR please make sure to read our contributing guidelines
3+
https://github.com/goonism/hyperproxy/blob/master/documentations/
4+
5+
For issue references: Add a comma-separated list of a [closing word](https://help.github.com/articles/closing-issues-via-commit-messages/) followed by the ticket number fixed by the PR. It should be underlined in the preview if done correctly.
6+
-->
7+
8+
| Q | A <!--(Can use an emoji 👍) -->
9+
| ------------------------ | ---
10+
| Fixed Issues? | `Fixes #1, Fixes #2` <!-- remove the (`) quotes to link the issues -->
11+
| Patch: Bug Fix? |
12+
| Major: Breaking Change? |
13+
| Minor: New Feature? |
14+
| Tests Added + Pass? | Yes
15+
| Documentation PR | <!-- If so, add `[skip ci]` to your commit message to skip CI -->
16+
| Any Dependency Changes? |
17+
| License | MIT
18+
19+
<!-- Describe your changes below in as much detail as possible -->

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
node_modules
2-
db/
1+
node_modules/
2+
lerna-debug.log
3+
packages/**/lib

.yarnrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
workspaces-experimental true

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Stolab
3+
Copyright (c) 2018 GSM
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Check out this [post](https://louisgv.me/2018/blog/dat-hyperproxy-concept/)
1919
# Setup
2020

2121

22-
2322
# Credits
2423

2524
Logo created using [DotGrid](https://github.com/hundredrabbits/Dotgrid) by [Devine Lu Linvega](https://twitter.com/neauoire)

documentations/CODE_OF_CONDUCT.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting @louisgv on [Twitter](https://twitter.com/LGVichy) or @ColdSauce on [Twitter](https://twitter.com/stayfun_). All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

documentations/CONTRIBUTING.md

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
----
2+
3+
<p align="center" class="toc">
4+
<strong><a href="#setup">Setup</a></strong>
5+
|
6+
<strong><a href="#writing-tests">Writing tests</a></strong>
7+
|
8+
<strong><a href="#debugging-code">Debugging code</a></strong>
9+
|
10+
<strong><a href="#internals">Internals</a></strong>
11+
</p>
12+
13+
----
14+
15+
16+
# Contributing
17+
18+
Contributions are always welcome, no matter how large or small. Before
19+
contributing, please read the
20+
[code of conduct](https://github.com/goonism/hyperproxy/blob/master/documentation/CODE_OF_CONDUCT.md).
21+
22+
## Not sure where to start?
23+
24+
- If you aren't just making a documentation change, you'll probably want to learn a bit about a few topics.
25+
26+
- Check out [`/documentations`](https://github.com/goonism/hyperproxy/tree/master/documentations) for information about arbiter's internals
27+
28+
- When you feel ready to jump into the HyperProxy source code, a good place to start is to look for issues tagged with [help wanted](https://github.com/goonism/hyperproxy/labels/help%20wanted) and/or [good first issue](https://github.com/goonism/hyperproxy/labels/good%20first%20issue).
29+
30+
## Developing
31+
32+
HyperProxy is built for Node 9 and up.
33+
34+
Make sure that Yarn is installed with version >= `0.28.0`.
35+
Installation instructions can be found here: https://yarnpkg.com/en/docs/install.
36+
37+
### Setup
38+
39+
```sh
40+
$ git clone https://github.com/goonism/hyperproxy
41+
$ cd hyperproxy
42+
$ lerna bootstrap
43+
```
44+
45+
Then you can run:
46+
47+
```sh
48+
$ lerna run build
49+
$ lerna run start
50+
```
51+
52+
### Guide on lerna
53+
54+
The following are list of useful root command (command that should be run from the root directory):
55+
56+
```
57+
"yarn bootstrap": Bootstrap dependency for all modules
58+
"yarn test": Run unit test in each module
59+
"yarn prepare": Prepare all package to publish
60+
"yarn clean": Clean up all local build artifact
61+
```
62+
63+
### Writing tests
64+
65+
Most packages in [`/packages`](https://github.com/hyperproxy/tree/master/packages) have a `test` folder.
66+
67+
### Debugging code
68+
69+
A common approach to debugging JavaScript code is to walk through the code using the [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/) debugger.
File renamed without changes.

documentations/rfcs/.keep

Whitespace-only changes.

documentations/rfcs/packges.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# hyperproxy-node
2+
The HyperProxy Node is a node with concept similar to a webtorrent hybrid client. Its main job is to route any given request to the larger TCP/UDP nodes in the DAT ecosystem and return the result back to the original request initiator.
3+
4+
# hyperproxy-hub
5+
The HyperProxy Hub is a webrtc signalhubws server that is used as a lobby channel for peer to discover each other. In milestone 3, it is also used to ensure that for every peer contacted it, there is at least one hyperproxy-node available to serve that peer request.
6+
7+
# hyperproxy-browser
8+
A HyperProxy Browser is a regular WebRTC participant who join the swarm like any other DAT node, used as a test client for plain browser node.

index.js

-1
This file was deleted.

lerna.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"lerna": "2.5.1",
3+
"packages": [
4+
"packages/*"
5+
],
6+
"version": "1.0.0-0",
7+
"npmClient": "yarn",
8+
"useWorkspaces": true
9+
}

lib/HyperProxy.js

-55
This file was deleted.

lib/index.js

-41
This file was deleted.

0 commit comments

Comments
 (0)