From 78f912ed5733028ec2bf10c06c19f75b07943be2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Jun 2018 14:21:03 +0200 Subject: Improve P2P & Privacy section --- .../about-instance/about-instance.component.html | 39 +++++++++ .../about-instance/about-instance.component.scss | 18 ++++ .../about-instance/about-instance.component.ts | 50 +++++++++++ .../about-peertube/about-peertube.component.html | 97 ++++++++++++++++++++++ .../about-peertube/about-peertube.component.scss | 22 +++++ .../about-peertube/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 +++ client/src/app/+about/about.module.ts | 28 +++++++ client/src/app/+about/index.ts | 3 + client/src/app/about/about-routing.module.ts | 23 ----- client/src/app/about/about.component.html | 50 ----------- client/src/app/about/about.component.scss | 12 --- client/src/app/about/about.component.ts | 50 ----------- client/src/app/about/about.module.ts | 24 ------ client/src/app/about/index.ts | 3 - client/src/app/app-routing.module.ts | 4 + client/src/app/app.module.ts | 2 - .../videos/+video-watch/video-watch.component.html | 2 +- 21 files changed, 342 insertions(+), 165 deletions(-) create mode 100644 client/src/app/+about/about-instance/about-instance.component.html create mode 100644 client/src/app/+about/about-instance/about-instance.component.scss create mode 100644 client/src/app/+about/about-instance/about-instance.component.ts 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 create mode 100644 client/src/app/+about/about.module.ts create mode 100644 client/src/app/+about/index.ts delete mode 100644 client/src/app/about/about-routing.module.ts delete mode 100644 client/src/app/about/about.component.html delete mode 100644 client/src/app/about/about.component.scss delete mode 100644 client/src/app/about/about.component.ts delete mode 100644 client/src/app/about/about.module.ts delete mode 100644 client/src/app/about/index.ts (limited to 'client/src/app') 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-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 @@ +@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; + margin-bottom: 5px; +} + +.short-description, .description, .terms, .signup { + margin-bottom: 30px; +} 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 @@ +import { Component, OnInit } from '@angular/core' +import { ServerService } from '@app/core' +import { MarkdownService } from '@app/videos/shared' +import { NotificationsService } from 'angular2-notifications' +import { I18n } from '@ngx-translate/i18n-polyfill' + +@Component({ + selector: 'my-about-instance', + templateUrl: './about-instance.component.html', + styleUrls: [ './about-instance.component.scss' ] +}) + +export class AboutInstanceComponent implements OnInit { + shortDescription = '' + descriptionHTML = '' + termsHTML = '' + + constructor ( + private notificationsService: NotificationsService, + private serverService: ServerService, + private markdownService: MarkdownService, + private i18n: I18n + ) {} + + get instanceName () { + return this.serverService.getConfig().instance.name + } + + get userVideoQuota () { + return this.serverService.getConfig().user.videoQuota + } + + get isSignupAllowed () { + return this.serverService.getConfig().signup.allowed + } + + ngOnInit () { + this.serverService.getAbout() + .subscribe( + res => { + this.shortDescription = res.instance.shortDescription + this.descriptionHTML = this.markdownService.textMarkdownToHTML(res.instance.description) + this.termsHTML = this.markdownService.textMarkdownToHTML(res.instance.terms) + }, + + err => this.notificationsService.error(this.i18n('Error getting about from server'), err) + ) + } + +} 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 new file mode 100644 index 000000000..ff6e8ef41 --- /dev/null +++ b/client/src/app/+about/about.module.ts @@ -0,0 +1,28 @@ +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: [ + AboutRoutingModule, + SharedModule + ], + + declarations: [ + AboutComponent, + AboutInstanceComponent, + AboutPeertubeComponent + ], + + exports: [ + AboutComponent + ], + + providers: [ + ] +}) +export 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 @@ +export * from './about-routing.module' +export * from './about.component' +export * from './about.module' 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/about/about.component.scss b/client/src/app/about/about.component.scss deleted file mode 100644 index a63cd229c..000000000 --- a/client/src/app/about/about.component.scss +++ /dev/null @@ -1,12 +0,0 @@ -@import '_variables'; -@import '_mixins'; - -.section-title { - font-weight: $font-semibold; - font-size: 20px; - margin-bottom: 5px; -} - -.short-description, .description, .terms, .signup { - margin-bottom: 30px; -} diff --git a/client/src/app/about/about.component.ts b/client/src/app/about/about.component.ts deleted file mode 100644 index c37b9318b..000000000 --- a/client/src/app/about/about.component.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Component, OnInit } from '@angular/core' -import { ServerService } from '@app/core' -import { MarkdownService } from '@app/videos/shared' -import { NotificationsService } from 'angular2-notifications' -import { I18n } from '@ngx-translate/i18n-polyfill' - -@Component({ - selector: 'my-about', - templateUrl: './about.component.html', - styleUrls: [ './about.component.scss' ] -}) - -export class AboutComponent implements OnInit { - shortDescription = '' - descriptionHTML = '' - termsHTML = '' - - constructor ( - private notificationsService: NotificationsService, - private serverService: ServerService, - private markdownService: MarkdownService, - private i18n: I18n - ) {} - - get instanceName () { - return this.serverService.getConfig().instance.name - } - - get userVideoQuota () { - return this.serverService.getConfig().user.videoQuota - } - - get isSignupAllowed () { - return this.serverService.getConfig().signup.allowed - } - - ngOnInit () { - this.serverService.getAbout() - .subscribe( - res => { - this.shortDescription = res.instance.shortDescription - this.descriptionHTML = this.markdownService.textMarkdownToHTML(res.instance.description) - this.termsHTML = this.markdownService.textMarkdownToHTML(res.instance.terms) - }, - - err => this.notificationsService.error(this.i18n('Error getting about from server'), err) - ) - } - -} diff --git a/client/src/app/about/about.module.ts b/client/src/app/about/about.module.ts deleted file mode 100644 index da3163f43..000000000 --- a/client/src/app/about/about.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core' - -import { AboutRoutingModule } from './about-routing.module' -import { AboutComponent } from './about.component' -import { SharedModule } from '../shared' - -@NgModule({ - imports: [ - AboutRoutingModule, - SharedModule - ], - - declarations: [ - AboutComponent - ], - - exports: [ - AboutComponent - ], - - providers: [ - ] -}) -export class AboutModule { } diff --git a/client/src/app/about/index.ts b/client/src/app/about/index.ts deleted file mode 100644 index 218d09801..000000000 --- a/client/src/app/about/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './about-routing.module' -export * from './about.component' -export * from './about.module' 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
-- cgit v1.2.3