diff options
Diffstat (limited to 'client/src/app')
17 files changed, 258 insertions, 81 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.component.scss b/client/src/app/+about/about-instance/about-instance.component.scss index a63cd229c..b451e85aa 100644 --- a/client/src/app/about/about.component.scss +++ b/client/src/app/+about/about-instance/about-instance.component.scss | |||
@@ -1,6 +1,12 @@ | |||
1 | @import '_variables'; | 1 | @import '_variables'; |
2 | @import '_mixins'; | 2 | @import '_mixins'; |
3 | 3 | ||
4 | .about-instance-title { | ||
5 | font-size: 20px; | ||
6 | font-weight: bold; | ||
7 | margin-bottom: 15px; | ||
8 | } | ||
9 | |||
4 | .section-title { | 10 | .section-title { |
5 | font-weight: $font-semibold; | 11 | font-weight: $font-semibold; |
6 | font-size: 20px; | 12 | font-size: 20px; |
diff --git a/client/src/app/about/about.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts index c37b9318b..354f52ce7 100644 --- a/client/src/app/about/about.component.ts +++ b/client/src/app/+about/about-instance/about-instance.component.ts | |||
@@ -5,12 +5,12 @@ import { NotificationsService } from 'angular2-notifications' | |||
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
8 | selector: 'my-about', | 8 | selector: 'my-about-instance', |
9 | templateUrl: './about.component.html', | 9 | templateUrl: './about-instance.component.html', |
10 | styleUrls: [ './about.component.scss' ] | 10 | styleUrls: [ './about-instance.component.scss' ] |
11 | }) | 11 | }) |
12 | 12 | ||
13 | export class AboutComponent implements OnInit { | 13 | export class AboutInstanceComponent implements OnInit { |
14 | shortDescription = '' | 14 | shortDescription = '' |
15 | descriptionHTML = '' | 15 | descriptionHTML = '' |
16 | termsHTML = '' | 16 | termsHTML = '' |
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 @@ | |||
1 | import { 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 | |||
9 | export 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 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | import { MetaGuard } from '@ngx-meta/core' | ||
4 | import { AboutComponent } from './about.component' | ||
5 | import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component' | ||
6 | import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component' | ||
7 | |||
8 | const 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 | }) | ||
45 | export 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 @@ | |||
1 | import { Component } from '@angular/core' | ||
2 | |||
3 | @Component({ | ||
4 | selector: 'my-about', | ||
5 | templateUrl: './about.component.html', | ||
6 | styleUrls: [ './about.component.scss' ] | ||
7 | }) | ||
8 | |||
9 | export class AboutComponent { | ||
10 | |||
11 | } | ||
diff --git a/client/src/app/about/about.module.ts b/client/src/app/+about/about.module.ts index da3163f43..ff6e8ef41 100644 --- a/client/src/app/about/about.module.ts +++ b/client/src/app/+about/about.module.ts | |||
@@ -3,6 +3,8 @@ import { NgModule } from '@angular/core' | |||
3 | import { AboutRoutingModule } from './about-routing.module' | 3 | import { AboutRoutingModule } from './about-routing.module' |
4 | import { AboutComponent } from './about.component' | 4 | import { AboutComponent } from './about.component' |
5 | import { SharedModule } from '../shared' | 5 | import { SharedModule } from '../shared' |
6 | import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component' | ||
7 | import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component' | ||
6 | 8 | ||
7 | @NgModule({ | 9 | @NgModule({ |
8 | imports: [ | 10 | imports: [ |
@@ -11,7 +13,9 @@ import { SharedModule } from '../shared' | |||
11 | ], | 13 | ], |
12 | 14 | ||
13 | declarations: [ | 15 | declarations: [ |
14 | AboutComponent | 16 | AboutComponent, |
17 | AboutInstanceComponent, | ||
18 | AboutPeertubeComponent | ||
15 | ], | 19 | ], |
16 | 20 | ||
17 | exports: [ | 21 | exports: [ |
diff --git a/client/src/app/about/index.ts b/client/src/app/+about/index.ts index 218d09801..218d09801 100644 --- a/client/src/app/about/index.ts +++ b/client/src/app/+about/index.ts | |||
diff --git a/client/src/app/about/about-routing.module.ts b/client/src/app/about/about-routing.module.ts deleted file mode 100644 index 11a650c80..000000000 --- a/client/src/app/about/about-routing.module.ts +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | import { NgModule } from '@angular/core' | ||
2 | import { RouterModule, Routes } from '@angular/router' | ||
3 | import { MetaGuard } from '@ngx-meta/core' | ||
4 | import { AboutComponent } from './about.component' | ||
5 | |||
6 | const aboutRoutes: Routes = [ | ||
7 | { | ||
8 | path: 'about', | ||
9 | component: AboutComponent, | ||
10 | canActivate: [ MetaGuard ], | ||
11 | data: { | ||
12 | meta: { | ||
13 | title: 'About' | ||
14 | } | ||
15 | } | ||
16 | } | ||
17 | ] | ||
18 | |||
19 | @NgModule({ | ||
20 | imports: [ RouterModule.forChild(aboutRoutes) ], | ||
21 | exports: [ RouterModule ] | ||
22 | }) | ||
23 | export class AboutRoutingModule {} | ||
diff --git a/client/src/app/about/about.component.html b/client/src/app/about/about.component.html deleted file mode 100644 index dc13f785d..000000000 --- a/client/src/app/about/about.component.html +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | <div class="margin-content"> | ||
2 | <div i18n class="title-page title-page-single"> | ||
3 | Welcome to the {{ instanceName }} instance | ||
4 | </div> | ||
5 | |||
6 | <div class="short-description"> | ||
7 | <div>{{ shortDescription }}</div> | ||
8 | </div> | ||
9 | |||
10 | <div class="description"> | ||
11 | <div i18n class="section-title">Description</div> | ||
12 | |||
13 | <div [innerHTML]="descriptionHTML"></div> | ||
14 | </div> | ||
15 | |||
16 | <div class="terms"> | ||
17 | <div i18n class="section-title">Terms</div> | ||
18 | |||
19 | <div [innerHTML]="termsHTML"></div> | ||
20 | </div> | ||
21 | |||
22 | <div class="signup"> | ||
23 | <div i18n class="section-title">Signup</div> | ||
24 | |||
25 | <div *ngIf="isSignupAllowed"> | ||
26 | <ng-container i18n>User registration is allowed and</ng-container> | ||
27 | |||
28 | <ng-container i18n *ngIf="userVideoQuota !== -1"> | ||
29 | this instance provides a baseline quota of {{ userVideoQuota | bytes: 0 }} space for the videos of its users. | ||
30 | </ng-container> | ||
31 | |||
32 | <ng-container i18n *ngIf="userVideoQuota === -1"> | ||
33 | this instance provides unlimited space for the videos of its users. | ||
34 | </ng-container> | ||
35 | </div> | ||
36 | |||
37 | <div i18n *ngIf="isSignupAllowed === false"> | ||
38 | User registration is currently not allowed. | ||
39 | </div> | ||
40 | </div> | ||
41 | |||
42 | <div id="p2p-privacy"> | ||
43 | <div i18n class="section-title">P2P & Privacy</div> | ||
44 | |||
45 | <p i18n> | ||
46 | PeerTube uses the BitTorrent protocol to share bandwidth between users. It implies that your public IP address is stored in the public BitTorrent tracker of the video PeerTube instance as long as you're watching the video. | ||
47 | If you want to keep your public IP address private, please use a VPN or the Tor Browser. | ||
48 | </p> | ||
49 | </div> | ||
50 | </div> | ||
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 04c53548e..0b31bf453 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts | |||
@@ -21,6 +21,10 @@ const routes: Routes = [ | |||
21 | loadChildren: './+video-channels/video-channels.module#VideoChannelsModule' | 21 | loadChildren: './+video-channels/video-channels.module#VideoChannelsModule' |
22 | }, | 22 | }, |
23 | { | 23 | { |
24 | path: 'about', | ||
25 | loadChildren: './+about/about.module#AboutModule' | ||
26 | }, | ||
27 | { | ||
24 | path: '**', | 28 | path: '**', |
25 | loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule' | 29 | loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule' |
26 | } | 30 | } |
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 003c91009..9cffdd31e 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import { LOCALE_ID, NgModule, TRANSLATIONS, TRANSLATIONS_FORMAT } from '@angular/core' | 1 | import { LOCALE_ID, NgModule, TRANSLATIONS, TRANSLATIONS_FORMAT } from '@angular/core' |
2 | import { BrowserModule } from '@angular/platform-browser' | 2 | import { BrowserModule } from '@angular/platform-browser' |
3 | import { AboutModule } from '@app/about' | ||
4 | import { ServerService } from '@app/core' | 3 | import { ServerService } from '@app/core' |
5 | import { ResetPasswordModule } from '@app/reset-password' | 4 | import { ResetPasswordModule } from '@app/reset-password' |
6 | 5 | ||
@@ -53,7 +52,6 @@ export function metaFactory (serverService: ServerService): MetaLoader { | |||
53 | SignupModule, | 52 | SignupModule, |
54 | SharedModule, | 53 | SharedModule, |
55 | VideosModule, | 54 | VideosModule, |
56 | AboutModule, | ||
57 | 55 | ||
58 | MetaModule.forRoot({ | 56 | MetaModule.forRoot({ |
59 | provide: MetaLoader, | 57 | provide: MetaLoader, |
diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index 208375e33..492568d3c 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html | |||
@@ -195,7 +195,7 @@ | |||
195 | <ng-container i18n> | 195 | <ng-container i18n> |
196 | The sharing system used by this video implies that some technical information about your system (such as a public IP address) can be accessed publicly. | 196 | The sharing system used by this video implies that some technical information about your system (such as a public IP address) can be accessed publicly. |
197 | </ng-container> | 197 | </ng-container> |
198 | <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about#p2p-privacy">More information</a> | 198 | <a i18n i18n-title title="Get more information" target="_blank" rel="noopener noreferrer" href="/about/peertube">More information</a> |
199 | </div> | 199 | </div> |
200 | 200 | ||
201 | <div i18n class="privacy-concerns-okay" (click)="acceptedPrivacyConcern()"> | 201 | <div i18n class="privacy-concerns-okay" (click)="acceptedPrivacyConcern()"> |