From 78f912ed5733028ec2bf10c06c19f75b07943be2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Jun 2018 14:21:03 +0200 Subject: [PATCH] Improve P2P & Privacy section --- .../about-instance.component.html | 39 ++++++++ .../about-instance.component.scss} | 6 ++ .../about-instance.component.ts} | 8 +- .../about-peertube.component.html | 97 +++++++++++++++++++ .../about-peertube.component.scss | 22 +++++ .../about-peertube.component.ts | 10 ++ client/src/app/+about/about-routing.module.ts | 45 +++++++++ client/src/app/+about/about.component.html | 14 +++ client/src/app/+about/about.component.scss | 0 client/src/app/+about/about.component.ts | 11 +++ .../src/app/{about => +about}/about.module.ts | 6 +- client/src/app/{about => +about}/index.ts | 0 client/src/app/about/about-routing.module.ts | 23 ----- client/src/app/about/about.component.html | 50 ---------- client/src/app/app-routing.module.ts | 4 + client/src/app/app.module.ts | 2 - .../+video-watch/video-watch.component.html | 2 +- client/src/standalone/videos/embed.ts | 2 +- 18 files changed, 259 insertions(+), 82 deletions(-) create mode 100644 client/src/app/+about/about-instance/about-instance.component.html rename client/src/app/{about/about.component.scss => +about/about-instance/about-instance.component.scss} (70%) rename client/src/app/{about/about.component.ts => +about/about-instance/about-instance.component.ts} (86%) create mode 100644 client/src/app/+about/about-peertube/about-peertube.component.html create mode 100644 client/src/app/+about/about-peertube/about-peertube.component.scss create mode 100644 client/src/app/+about/about-peertube/about-peertube.component.ts create mode 100644 client/src/app/+about/about-routing.module.ts create mode 100644 client/src/app/+about/about.component.html create mode 100644 client/src/app/+about/about.component.scss create mode 100644 client/src/app/+about/about.component.ts rename client/src/app/{about => +about}/about.module.ts (59%) rename client/src/app/{about => +about}/index.ts (100%) delete mode 100644 client/src/app/about/about-routing.module.ts delete mode 100644 client/src/app/about/about.component.html 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 @@ +
+ About {{ instanceName }} instance +
+ +
+
{{ shortDescription }}
+
+ +
+
Description
+ +
+
+ +
+
Terms
+ +
+
+ +
+
Signup
+ +
+ User registration is allowed and + + + this instance provides a baseline quota of {{ userVideoQuota | bytes: 0 }} space for the videos of its users. + + + + this instance provides unlimited space for the videos of its users. + +
+ +
+ User registration is currently not allowed. +
+
\ 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 similarity index 70% rename from client/src/app/about/about.component.scss rename to 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 @@ @import '_variables'; @import '_mixins'; +.about-instance-title { + font-size: 20px; + font-weight: bold; + margin-bottom: 15px; +} + .section-title { font-weight: $font-semibold; font-size: 20px; diff --git a/client/src/app/about/about.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts similarity index 86% rename from client/src/app/about/about.component.ts rename to 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' import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ - selector: 'my-about', - templateUrl: './about.component.html', - styleUrls: [ './about.component.scss' ] + selector: 'my-about-instance', + templateUrl: './about-instance.component.html', + styleUrls: [ './about-instance.component.scss' ] }) -export class AboutComponent implements OnInit { +export class AboutInstanceComponent implements OnInit { shortDescription = '' descriptionHTML = '' 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 @@ +
+ About PeerTube +
+ +
+

PeerTube is a federated (ActivityPub) video streaming platform using P2P (WebTorrent) directly in the web browser.

+ +

+ It is a free and open-source software, under the AGPLv3 licence. +

+ +

+ For more information, please visit joinpeertube.org. +

+
+ +
+
P2P & Privacy
+ +

+ PeerTube uses the BitTorrent protocol to share bandwidth between users. + This implies that your IP address is stored in the instance's BitTorrent tracker as long as you download or watch the video. +

+ +

What are the consequences?

+ +

+ In theory, someone with enough technical skills could create a script that tracks which IP is downloading which video. + In practice, this is much more difficult because: +

+ + + +

+ The worst-case scenario of an average person spying on their friends is quite unlikely. + There are much more effective ways to get that kind of information. +

+ +

How does PeerTube compares to YouTube?

+ +

+ The threats to privacy in YouTube are different from PeerTube's. + In YouTube's case, the platform gathers a huge amount of your personal information (not only your IP) to analyze them and track you. + Moreover, YouTube is owned by Google/Alphabet, a company that tracks you across many websites (via AdSense or Google Analytics). +

+ +

What can I do to limit the exposure of my IP address?

+ +

+ 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. + 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. + Thinking that removing P2P from PeerTube will give you back anonymity doesn't make sense. +

+ +

What will be done to mitigate this problem?

+ +

+ PeerTube is only in beta, and want to deliver the best countermeasures possible by the time the stable is released. + In the meantime, we want to test different ideas related to this issue: +

+ + +
\ 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 @@ +@import '_variables'; +@import '_mixins'; + +.about-peertube-title { + font-size: 20px; + font-weight: bold; + margin-bottom: 15px; +} + +.section-title { + font-weight: $font-semibold; + font-size: 20px; + margin-bottom: 5px; +} + +.description { + margin-bottom: 30px; +} + +.p2p-privacy-title { + margin-top: 15px; +} \ 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 @@ +import { Component } from '@angular/core' + +@Component({ + selector: 'my-about-peertube', + templateUrl: './about-peertube.component.html', + styleUrls: [ './about-peertube.component.scss' ] +}) + +export class AboutPeertubeComponent { +} 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 @@ +import { NgModule } from '@angular/core' +import { RouterModule, Routes } from '@angular/router' +import { MetaGuard } from '@ngx-meta/core' +import { AboutComponent } from './about.component' +import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component' +import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component' + +const aboutRoutes: Routes = [ + { + path: '', + component: AboutComponent, + canActivateChild: [ MetaGuard ], + children: [ + { + path: '', + redirectTo: 'instance', + pathMatch: 'full' + }, + { + path: 'instance', + component: AboutInstanceComponent, + data: { + meta: { + title: 'About this instance' + } + } + }, + { + path: 'peertube', + component: AboutPeertubeComponent, + data: { + meta: { + title: 'About PeerTube' + } + } + } + ] + } +] + +@NgModule({ + imports: [ RouterModule.forChild(aboutRoutes) ], + exports: [ RouterModule ] +}) +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 @@ +
+ + +
+ +
+
\ 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 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 @@ +import { Component } from '@angular/core' + +@Component({ + selector: 'my-about', + templateUrl: './about.component.html', + styleUrls: [ './about.component.scss' ] +}) + +export class AboutComponent { + +} diff --git a/client/src/app/about/about.module.ts b/client/src/app/+about/about.module.ts similarity index 59% rename from client/src/app/about/about.module.ts rename to 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' import { AboutRoutingModule } from './about-routing.module' import { AboutComponent } from './about.component' import { SharedModule } from '../shared' +import { AboutInstanceComponent } from '@app/+about/about-instance/about-instance.component' +import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component' @NgModule({ imports: [ @@ -11,7 +13,9 @@ import { SharedModule } from '../shared' ], declarations: [ - AboutComponent + AboutComponent, + AboutInstanceComponent, + AboutPeertubeComponent ], exports: [ diff --git a/client/src/app/about/index.ts b/client/src/app/+about/index.ts similarity index 100% rename from client/src/app/about/index.ts rename to 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 @@ -import { NgModule } from '@angular/core' -import { RouterModule, Routes } from '@angular/router' -import { MetaGuard } from '@ngx-meta/core' -import { AboutComponent } from './about.component' - -const aboutRoutes: Routes = [ - { - path: 'about', - component: AboutComponent, - canActivate: [ MetaGuard ], - data: { - meta: { - title: 'About' - } - } - } -] - -@NgModule({ - imports: [ RouterModule.forChild(aboutRoutes) ], - exports: [ RouterModule ] -}) -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 @@ -
-
- Welcome to the {{ instanceName }} instance -
- -
-
{{ shortDescription }}
-
- -
-
Description
- -
-
- -
-
Terms
- -
-
- - - -
-
P2P & Privacy
- -

- 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. - If you want to keep your public IP address private, please use a VPN or the Tor Browser. -

-
-
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 @@ -20,6 +20,10 @@ const routes: Routes = [ path: 'video-channels', loadChildren: './+video-channels/video-channels.module#VideoChannelsModule' }, + { + path: 'about', + loadChildren: './+about/about.module#AboutModule' + }, { path: '**', loadChildren: './+page-not-found/page-not-found.module#PageNotFoundModule' 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 @@ import { LOCALE_ID, NgModule, TRANSLATIONS, TRANSLATIONS_FORMAT } from '@angular/core' import { BrowserModule } from '@angular/platform-browser' -import { AboutModule } from '@app/about' import { ServerService } from '@app/core' import { ResetPasswordModule } from '@app/reset-password' @@ -53,7 +52,6 @@ export function metaFactory (serverService: ServerService): MetaLoader { SignupModule, SharedModule, VideosModule, - AboutModule, MetaModule.forRoot({ 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 @@ 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. - More information + More information
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index bf0eb484e..d8db2a119 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -107,7 +107,7 @@ loadLocale(window.location.origin, videojs, navigator.language) player.dock({ title: videoInfo.name, - description: player.localize('Uses P2P, others may know you are watching this video.') + description: player.localize('Uses P2P, others may know your IP is downloading this video.') }) addContextMenu(player, window.location.origin + videoInfo.embedPath) -- 2.41.0