aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+about
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-27 14:21:03 +0200
committerChocobozzz <me@florianbigard.com>2018-06-27 14:59:09 +0200
commit78f912ed5733028ec2bf10c06c19f75b07943be2 (patch)
tree4bf9692230deabc4e050e5a7de126b38901969e9 /client/src/app/+about
parent61b909b9bf849516f30dab2bf5977acfbbddc5c6 (diff)
downloadPeerTube-78f912ed5733028ec2bf10c06c19f75b07943be2.tar.gz
PeerTube-78f912ed5733028ec2bf10c06c19f75b07943be2.tar.zst
PeerTube-78f912ed5733028ec2bf10c06c19f75b07943be2.zip
Improve P2P & Privacy section
Diffstat (limited to 'client/src/app/+about')
-rw-r--r--client/src/app/+about/about-instance/about-instance.component.html39
-rw-r--r--client/src/app/+about/about-instance/about-instance.component.scss18
-rw-r--r--client/src/app/+about/about-instance/about-instance.component.ts50
-rw-r--r--client/src/app/+about/about-peertube/about-peertube.component.html97
-rw-r--r--client/src/app/+about/about-peertube/about-peertube.component.scss22
-rw-r--r--client/src/app/+about/about-peertube/about-peertube.component.ts10
-rw-r--r--client/src/app/+about/about-routing.module.ts45
-rw-r--r--client/src/app/+about/about.component.html14
-rw-r--r--client/src/app/+about/about.component.scss0
-rw-r--r--client/src/app/+about/about.component.ts11
-rw-r--r--client/src/app/+about/about.module.ts28
-rw-r--r--client/src/app/+about/index.ts3
12 files changed, 337 insertions, 0 deletions
diff --git a/client/src/app/+about/about-instance/about-instance.component.html b/client/src/app/+about/about-instance/about-instance.component.html
new file mode 100644
index 000000000..e433b0016
--- /dev/null
+++ b/client/src/app/+about/about-instance/about-instance.component.html
@@ -0,0 +1,39 @@
1<div i18n class="about-instance-title">
2 About {{ instanceName }} instance
3</div>
4
5<div class="short-description">
6 <div>{{ shortDescription }}</div>
7</div>
8
9<div class="description">
10 <div i18n class="section-title">Description</div>
11
12 <div [innerHTML]="descriptionHTML"></div>
13</div>
14
15<div class="terms">
16 <div i18n class="section-title">Terms</div>
17
18 <div [innerHTML]="termsHTML"></div>
19</div>
20
21<div class="signup">
22 <div i18n class="section-title">Signup</div>
23
24 <div *ngIf="isSignupAllowed">
25 <ng-container i18n>User registration is allowed and</ng-container>
26
27 <ng-container i18n *ngIf="userVideoQuota !== -1">
28 this instance provides a baseline quota of {{ userVideoQuota | bytes: 0 }} space for the videos of its users.
29 </ng-container>
30
31 <ng-container i18n *ngIf="userVideoQuota === -1">
32 this instance provides unlimited space for the videos of its users.
33 </ng-container>
34 </div>
35
36 <div i18n *ngIf="isSignupAllowed === false">
37 User registration is currently not allowed.
38 </div>
39</div> \ No newline at end of file
diff --git a/client/src/app/+about/about-instance/about-instance.component.scss b/client/src/app/+about/about-instance/about-instance.component.scss
new file mode 100644
index 000000000..b451e85aa
--- /dev/null
+++ b/client/src/app/+about/about-instance/about-instance.component.scss
@@ -0,0 +1,18 @@
1@import '_variables';
2@import '_mixins';
3
4.about-instance-title {
5 font-size: 20px;
6 font-weight: bold;
7 margin-bottom: 15px;
8}
9
10.section-title {
11 font-weight: $font-semibold;
12 font-size: 20px;
13 margin-bottom: 5px;
14}
15
16.short-description, .description, .terms, .signup {
17 margin-bottom: 30px;
18}
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts
new file mode 100644
index 000000000..354f52ce7
--- /dev/null
+++ b/client/src/app/+about/about-instance/about-instance.component.ts
@@ -0,0 +1,50 @@
1import { Component, OnInit } from '@angular/core'
2import { ServerService } from '@app/core'
3import { MarkdownService } from '@app/videos/shared'
4import { NotificationsService } from 'angular2-notifications'
5import { I18n } from '@ngx-translate/i18n-polyfill'
6
7@Component({
8 selector: 'my-about-instance',
9 templateUrl: './about-instance.component.html',
10 styleUrls: [ './about-instance.component.scss' ]
11})
12
13export class AboutInstanceComponent implements OnInit {
14 shortDescription = ''
15 descriptionHTML = ''
16 termsHTML = ''
17
18 constructor (
19 private notificationsService: NotificationsService,
20 private serverService: ServerService,
21 private markdownService: MarkdownService,
22 private i18n: I18n
23 ) {}
24
25 get instanceName () {
26 return this.serverService.getConfig().instance.name
27 }
28
29 get userVideoQuota () {
30 return this.serverService.getConfig().user.videoQuota
31 }
32
33 get isSignupAllowed () {
34 return this.serverService.getConfig().signup.allowed
35 }
36
37 ngOnInit () {
38 this.serverService.getAbout()
39 .subscribe(
40 res => {
41 this.shortDescription = res.instance.shortDescription
42 this.descriptionHTML = this.markdownService.textMarkdownToHTML(res.instance.description)
43 this.termsHTML = this.markdownService.textMarkdownToHTML(res.instance.terms)
44 },
45
46 err => this.notificationsService.error(this.i18n('Error getting about from server'), err)
47 )
48 }
49
50}
diff --git a/client/src/app/+about/about-peertube/about-peertube.component.html b/client/src/app/+about/about-peertube/about-peertube.component.html
new file mode 100644
index 000000000..b0551f8b1
--- /dev/null
+++ b/client/src/app/+about/about-peertube/about-peertube.component.html
@@ -0,0 +1,97 @@
1<div i18n class="about-peertube-title">
2 About PeerTube
3</div>
4
5<div class="description">
6 <p i18n>PeerTube is a federated (ActivityPub) video streaming platform using P2P (WebTorrent) directly in the web browser.</p>
7
8 <p i18n>
9 It is a free and open-source software, under the <a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE">AGPLv3 licence</a>.
10 </p>
11
12 <p i18n>
13 For more information, please visit <a target="_blank" rel="noopener noreferrer" href="https://joinpeertube.org">joinpeertube.org</a>.
14 </p>
15</div>
16
17<div id="p2p-privacy">
18 <div i18n class="section-title">P2P & Privacy</div>
19
20 <p i18n>
21 PeerTube uses the BitTorrent protocol to share bandwidth between users.
22 This implies that your IP address is stored in the instance's BitTorrent tracker as long as you download or watch the video.
23 </p>
24
25 <h4 i18n class="p2p-privacy-title">What are the consequences?</h4>
26
27 <p i18n>
28 In theory, someone with enough technical skills could create a script that tracks which IP is downloading which video.
29 In practice, this is much more difficult because:
30 </p>
31
32 <ul>
33 <li i18n>
34 An HTTP request has to be sent on each tracker for each video to spy.
35 If we want to spy all PeerTube's videos, we have to send as many requests as there are videos (so potentially a lot)
36 </li>
37
38 <li i18n>
39 For each request sent, the tracker returns random peers at a limited number.
40 For instance, if there are 1000 peers in the swarm and the tracker sends only 20 peers for each request, there must be at least 50 requests sent to know every peers in the swarm
41 </li>
42
43 <li i18n>
44 Those requests have to be sent regularly to know who starts/stops watching a video. It is easy to detect that kind of behaviour
45 </li>
46
47 <li i18n>
48 If an IP address is stored in the tracker, it doesn't mean that the person behind the IP (if this person exists) has watched the video
49 </li>
50
51 <li i18n>
52 The IP address is a vague information : usually, it regularly changes and can represent many persons or entities
53 </li>
54
55 <li i18n>
56 Web peers are not directly sent by the tracker: because we use WebRTC inside the web browser, the protocol is different from classic BitTorrent.
57 When you are in a web browser, you send a signal containing your IP address to the tracker that will randomly choose other peers to forward the information to.
58 See <a href="https://github.com/yciabaud/webtorrent/blob/beps/bep_webrtc.rst">this document</a> for more information
59 </li>
60 </ul>
61
62 <p i18n>
63 The worst-case scenario of an average person spying on their friends is quite unlikely.
64 There are much more effective ways to get that kind of information.
65 </p>
66
67 <h4 i18n class="p2p-privacy-title">How does PeerTube compares to YouTube?</h4>
68
69 <p i18n>
70 The threats to privacy in YouTube are different from PeerTube's.
71 In YouTube's case, the platform gathers a huge amount of your personal information (not only your IP) to analyze them and track you.
72 Moreover, YouTube is owned by Google/Alphabet, a company that tracks you across many websites (via AdSense or Google Analytics).
73 </p>
74
75 <h4 i18n class="p2p-privacy-title">What can I do to limit the exposure of my IP address?</h4>
76
77 <p i18n>
78 Your IP address is public so every time you consult a website, there is a number of actors (in addition to the final website) seeing your IP in their connection logs: ISP/routers/trackers/CDN and more.
79 PeerTube is transparent about it: we warn you that if you want to keep your IP private, you must use a VPN or Tor Browser.
80 Thinking that removing P2P from PeerTube will give you back anonymity doesn't make sense.
81 </p>
82
83 <h4 i18n class="p2p-privacy-title">What will be done to mitigate this problem?</h4>
84
85 <p i18n>
86 PeerTube is only in beta, and want to deliver the best countermeasures possible by the time the stable is released.
87 In the meantime, we want to test different ideas related to this issue:
88 </p>
89
90 <ul>
91 <li i18n>Set a limit to the number of peers sent by the tracker</li>
92 <li i18n>Set a limit on the request frequency received by the tracker (being tested)</li>
93 <li i18n>Ring a bell if there are unusual requests (being tested)</li>
94 <li i18n>Disable P2P from the administration interface</li>
95 <li i18n>An automatic video redundancy program: we wouldn't know if the IP downloaded the video on purpose or if it was the automatized program</li>
96 </ul>
97</div> \ No newline at end of file
diff --git a/client/src/app/+about/about-peertube/about-peertube.component.scss b/client/src/app/+about/about-peertube/about-peertube.component.scss
new file mode 100644
index 000000000..1d8579ec1
--- /dev/null
+++ b/client/src/app/+about/about-peertube/about-peertube.component.scss
@@ -0,0 +1,22 @@
1@import '_variables';
2@import '_mixins';
3
4.about-peertube-title {
5 font-size: 20px;
6 font-weight: bold;
7 margin-bottom: 15px;
8}
9
10.section-title {
11 font-weight: $font-semibold;
12 font-size: 20px;
13 margin-bottom: 5px;
14}
15
16.description {
17 margin-bottom: 30px;
18}
19
20.p2p-privacy-title {
21 margin-top: 15px;
22} \ No newline at end of file
diff --git a/client/src/app/+about/about-peertube/about-peertube.component.ts b/client/src/app/+about/about-peertube/about-peertube.component.ts
new file mode 100644
index 000000000..64fd30837
--- /dev/null
+++ b/client/src/app/+about/about-peertube/about-peertube.component.ts
@@ -0,0 +1,10 @@
1import { Component } from '@angular/core'
2
3@Component({
4 selector: 'my-about-peertube',
5 templateUrl: './about-peertube.component.html',
6 styleUrls: [ './about-peertube.component.scss' ]
7})
8
9export class AboutPeertubeComponent {
10}
diff --git a/client/src/app/+about/about-routing.module.ts b/client/src/app/+about/about-routing.module.ts
new file mode 100644
index 000000000..c83c62c7f
--- /dev/null
+++ b/client/src/app/+about/about-routing.module.ts
@@ -0,0 +1,45 @@
1import { NgModule } from '@angular/core'
2import { RouterModule, Routes } from '@angular/router'
3import { MetaGuard } from '@ngx-meta/core'
4import { AboutComponent } from './about.component'
5import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component'
6import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component'
7
8const aboutRoutes: Routes = [
9 {
10 path: '',
11 component: AboutComponent,
12 canActivateChild: [ MetaGuard ],
13 children: [
14 {
15 path: '',
16 redirectTo: 'instance',
17 pathMatch: 'full'
18 },
19 {
20 path: 'instance',
21 component: AboutInstanceComponent,
22 data: {
23 meta: {
24 title: 'About this instance'
25 }
26 }
27 },
28 {
29 path: 'peertube',
30 component: AboutPeertubeComponent,
31 data: {
32 meta: {
33 title: 'About PeerTube'
34 }
35 }
36 }
37 ]
38 }
39]
40
41@NgModule({
42 imports: [ RouterModule.forChild(aboutRoutes) ],
43 exports: [ RouterModule ]
44})
45export class AboutRoutingModule {}
diff --git a/client/src/app/+about/about.component.html b/client/src/app/+about/about.component.html
new file mode 100644
index 000000000..8c50835c1
--- /dev/null
+++ b/client/src/app/+about/about.component.html
@@ -0,0 +1,14 @@
1<div class="row">
2 <div class="sub-menu">
3
4 <div class="links">
5 <a i18n routerLink="instance" routerLinkActive="active" class="title-page">Instance</a>
6
7 <a i18n routerLink="peertube" routerLinkActive="active" class="title-page">PeerTube</a>
8 </div>
9 </div>
10
11 <div class="margin-content">
12 <router-outlet></router-outlet>
13 </div>
14</div> \ No newline at end of file
diff --git a/client/src/app/+about/about.component.scss b/client/src/app/+about/about.component.scss
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/client/src/app/+about/about.component.scss
diff --git a/client/src/app/+about/about.component.ts b/client/src/app/+about/about.component.ts
new file mode 100644
index 000000000..7b65d920f
--- /dev/null
+++ b/client/src/app/+about/about.component.ts
@@ -0,0 +1,11 @@
1import { Component } from '@angular/core'
2
3@Component({
4 selector: 'my-about',
5 templateUrl: './about.component.html',
6 styleUrls: [ './about.component.scss' ]
7})
8
9export class AboutComponent {
10
11}
diff --git a/client/src/app/+about/about.module.ts b/client/src/app/+about/about.module.ts
new file mode 100644
index 000000000..ff6e8ef41
--- /dev/null
+++ b/client/src/app/+about/about.module.ts
@@ -0,0 +1,28 @@
1import { NgModule } from '@angular/core'
2
3import { AboutRoutingModule } from './about-routing.module'
4import { AboutComponent } from './about.component'
5import { SharedModule } from '../shared'
6import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component'
7import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component'
8
9@NgModule({
10 imports: [
11 AboutRoutingModule,
12 SharedModule
13 ],
14
15 declarations: [
16 AboutComponent,
17 AboutInstanceComponent,
18 AboutPeertubeComponent
19 ],
20
21 exports: [
22 AboutComponent
23 ],
24
25 providers: [
26 ]
27})
28export class AboutModule { }
diff --git a/client/src/app/+about/index.ts b/client/src/app/+about/index.ts
new file mode 100644
index 000000000..218d09801
--- /dev/null
+++ b/client/src/app/+about/index.ts
@@ -0,0 +1,3 @@
1export * from './about-routing.module'
2export * from './about.component'
3export * from './about.module'