Skip to content

Commit 681acc1

Browse files
committed
Updating the repo and removing obsolete v1 files.
0 parents  commit 681acc1

File tree

362 files changed

+128013
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

362 files changed

+128013
-0
lines changed

BACKERS.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Backers
2+
3+
Aether exists thanks to the generous fellows below. Funding Aether comes with some perks, such as registering your unique name before anyone else. [See here](https://getaether.net/supporterbenefits) for full benefits.
4+
5+
<a href="https://www.patreon.com/nehbit">
6+
<img src="https://c5.patreon.com/external/logo/[email protected]" width="160">
7+
</a>
8+
9+
## Companies
10+
11+
[[your name here]](https://www.patreon.com/bePatron?u=11407204)
12+
13+
## People
14+
15+
@sparklabs
16+
@HostFat
17+
@ssg
18+
@agalati
19+
@njha
20+
@rch
21+
@T
22+
@a
23+
@alex
24+
@drb
25+
@henq
26+
Alexander Thompson
27+
@Andrew
28+
Asher Gottlieb
29+
Benjamin Woodruff
30+
Chip Wasson
31+
Dawid Ciężarkiewicz
32+
Evan Henshawplath
33+
Grischa Boßlar
34+
John Travise
35+
@mindricity
36+
@Pavel
37+
@Peter
38+
Sebastian Jug
39+
John Travise
40+
Chuck Reed
41+
Alessandro Fort

LICENSE.md

+620
Large diffs are not rendered by default.

README.md

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<p align="center">
2+
<a href="https://getaether.net/">
3+
<img src="https://getaether.net/images/Logo-v3-light-bg.png" width="240">
4+
</a>
5+
</p>
6+
<p align="center">
7+
Aether is a peer-to-peer network of independent, self-moderated communities.
8+
</p>
9+
<p align="center">
10+
<a href="https://news.ycombinator.com/item?id=18370208">Hacker News</a>
11+
</p>
12+
<p align="center">
13+
<a href="http://www.theverge.com/2013/11/27/5150758/aether-aims-to-be-a-reddit-for-the-privacy-conscious">The Verge</a>
14+
</p>
15+
16+
## Heads up
17+
18+
The current version is a developer preview. It collects usage metrics to help debugging.
19+
20+
This is a developer preview, a pre-alpha. It is unstable and untested. It is not production-ready.
21+
22+
### Legalese
23+
24+
This software is provided for free, on an ***as-is*** basis, with no warranty, and ***without any expressed or implied offer of support***.
25+
26+
**THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
27+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
28+
HOLDERS AND/OR OTHER PARTIES ```PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
29+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
30+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31+
PURPOSE.``` THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
32+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
33+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.**
34+
35+
## Download
36+
[Download Aether](https://getaether.net)
37+
38+
Aether is available for Mac OS, Windows and Linux. The Linux version provided as a courtesy, it might work, but is completely unsupported. Windows and Mac OS versions are supported by users at [meta.geteather.net](https://meta.getaether.net/c/support).
39+
40+
## Filing a bug
41+
42+
Please create a topic in the appropriate section of [meta.getaether.net](https://meta.getaether.net). This allows non-Github-using majority of Aether users to help with your issue, and point you in the right direction.
43+
44+
# Backers
45+
46+
Aether exists thanks to the generous fellows below. Funding Aether comes with some perks, such as registering your unique name before anyone else. [See here](https://getaether.net/supporterbenefits) for full benefits.
47+
48+
<a href="https://www.patreon.com/nehbit">
49+
<img src="https://c5.patreon.com/external/logo/[email protected]" width="160">
50+
</a>
51+
52+
## Sponsors
53+
54+
[[your company here]](https://www.patreon.com/bePatron?u=11407204)
55+
56+
## People
57+
58+
@sparklabs
59+
60+
@HostFat
61+
62+
@ssg
63+
64+
@agalati
65+
66+
@njha
67+
68+
@rch
69+
70+
@T
71+
72+
@a
73+
74+
@alex
75+
76+
@drb
77+
78+
@henq
79+
80+
Alexander Thompson
81+
82+
@Andrew
83+
84+
Asher Gottlieb
85+
86+
Benjamin Woodruff
87+
88+
Chip Wasson
89+
90+
Dawid Ciężarkiewicz
91+
92+
Evan Henshawplath
93+
94+
Grischa Boßlar
95+
96+
John Travise
97+
98+
@mindricity
99+
100+
@Pavel
101+
102+
@Peter
103+
104+
Sebastian Jug
105+
106+
John Travise
107+
108+
Chuck Reed
109+
110+
Alessandro Fort
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
package beapiserver
2+
3+
import (
4+
pb "aether-core/aether/protos/beapi"
5+
"aether-core/aether/services/globals"
6+
"aether-core/aether/services/logging"
7+
"aether-core/aether/services/toolbox"
8+
"google.golang.org/grpc"
9+
// "google.golang.org/grpc/reflection"
10+
"fmt"
11+
// "golang.org/x/net/context"
12+
"net"
13+
"strconv"
14+
)
15+
16+
func StartBackendServer(gotValidPort chan bool) {
17+
logging.Logf(1, "Starting Backend API server.")
18+
defer logging.Logf(1, "Stopped Backend API server.")
19+
if globals.BackendConfig.GetBackendAPIPublic() {
20+
logBackendAPIServingPubliclyWarning()
21+
}
22+
var backendSourceIp string
23+
if globals.BackendConfig.GetBackendAPIPublic() {
24+
backendSourceIp = "0.0.0.0" // listen publicly
25+
} else {
26+
backendSourceIp = "127.0.0.1" // listen locally
27+
}
28+
sourceAddr := fmt.Sprint(backendSourceIp, ":", globals.BackendConfig.GetBackendAPIPort())
29+
listener, err := net.Listen("tcp4", sourceAddr)
30+
if err != nil {
31+
// Couldn't bind to the given port. Ask the OS to give us a free port instead, and save that port.
32+
var err2 error
33+
sourceAddr = fmt.Sprint(backendSourceIp, ":", 0)
34+
listener, err2 = net.Listen("tcp4", sourceAddr)
35+
if err2 != nil {
36+
logging.LogCrashf("The backend API Server could not start listening. Err: %v", err2)
37+
}
38+
_, sPort, _ := net.SplitHostPort(listener.Addr().String())
39+
sPortAsInt, _ := strconv.Atoi(sPort)
40+
globals.BackendConfig.SetBackendAPIPort(sPortAsInt)
41+
}
42+
gotValidPort <- true
43+
maxmsgsize := grpc.MaxMsgSize(toolbox.MaxInt32) // 12gb. debug TODO
44+
maxrecv := grpc.MaxRecvMsgSize(toolbox.MaxInt32)
45+
maxsend := grpc.MaxSendMsgSize(toolbox.MaxInt32)
46+
s := grpc.NewServer(maxmsgsize, maxrecv, maxsend)
47+
pb.RegisterBackendAPIServer(s, &server{})
48+
err2 := s.Serve(listener)
49+
if err2 != nil {
50+
logging.LogCrashf("Failed to serve the Backend API. %v", err2)
51+
}
52+
}
53+
54+
func logBackendAPIServingPubliclyWarning() {
55+
logging.Logf(1, `
56+
57+
///////////////////////////////////////////////////////////////////////////////
58+
HEADS UP: You are serving this backend API (that talks to frontends, not the one who talks to the Mim network) publicly on the Internet at port %d of this machine's external IP.
59+
If this is not your intent, do not provide the 'backendapipublic' flag at startup. This setting is false by default.
60+
///////////////////////////////////////////////////////////////////////////////
61+
`, globals.BackendConfig.GetBackendAPIPort())
62+
}

0 commit comments

Comments
 (0)