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 + 12 files changed, 337 insertions(+) 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 (limited to 'client/src/app/+about') 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' -- cgit v1.2.3