Replace PeopleTube/PeTube by the new name PeerTube

This commit is contained in:
Chocobozzz 2015-10-29 23:29:12 +01:00
parent 241abd6977
commit d148f3b9b1
10 changed files with 26 additions and 26 deletions

View File

@ -1,4 +1,4 @@
# PeTube # PeerTube
Prototype of a decentralized video streaming platform using P2P (bittorent) directly in the web browser with [webtorrent](https://github.com/feross/webtorrent). Prototype of a decentralized video streaming platform using P2P (bittorent) directly in the web browser with [webtorrent](https://github.com/feross/webtorrent).
@ -45,7 +45,7 @@ Prototype of a decentralized video streaming platform using P2P (bittorent) dire
### Test It! ### Test It!
$ git clone https://github.com/Chocobozzz/PeerTube $ git clone https://github.com/Chocobozzz/PeerTube
$ cd PeopleTube $ cd PeerTube
# npm install -g electron-prebuilt # npm install -g electron-prebuilt
$ npm install $ npm install
$ npm start $ npm start

View File

@ -39,7 +39,7 @@
var signature_ok = crt.hashAndVerify('sha256', new Buffer(req.body.signature.url).toString('hex'), req.body.signature.signature, 'hex') var signature_ok = crt.hashAndVerify('sha256', new Buffer(req.body.signature.url).toString('hex'), req.body.signature.signature, 'hex')
if (signature_ok === true) { if (signature_ok === true) {
var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'petube.key.pem')) var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'peertube.key.pem'))
var decryptedKey = myKey.decrypt(req.body.key, 'hex', 'utf8') var decryptedKey = myKey.decrypt(req.body.key, 'hex', 'utf8')
logger.debug(decryptedKey) logger.debug(decryptedKey)
req.body.data = JSON.parse(utils.symetricDecrypt(req.body.data, decryptedKey)) req.body.data = JSON.parse(utils.symetricDecrypt(req.body.data, decryptedKey))

View File

@ -1,6 +1,6 @@
{ {
"name": "petube", "name": "peertube",
"description": "none", "description": "Prototype of a decentralized video streaming platform using P2P (bittorent) directly in the web browser with webtorrent.",
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"engines": { "engines": {

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
printf "use petube-test1;\ndb.dropDatabase();\nuse petube-test2;\ndb.dropDatabase();\nuse petube-test3;\ndb.dropDatabase();" | mongo printf "use peertube-test1;\ndb.dropDatabase();\nuse peertube-test2;\ndb.dropDatabase();\nuse peertube-test3;\ndb.dropDatabase();" | mongo
rm -rf ./test1 ./test2 ./test3 rm -rf ./test1 ./test2 ./test3

View File

@ -24,7 +24,7 @@
checker.createDirectories() checker.createDirectories()
// ----------- PeTube modules ----------- // ----------- PeerTube modules -----------
var config = require('config') var config = require('config')
var logger = require('./src/logger') var logger = require('./src/logger')
var routes = require('./routes') var routes = require('./routes')

View File

@ -6,7 +6,7 @@
var logger = require('./logger') var logger = require('./logger')
var dbname = 'petube' + config.get('database.suffix') var dbname = 'peertube' + config.get('database.suffix')
var host = config.get('database.host') var host = config.get('database.host')
var port = config.get('database.port') var port = config.get('database.port')

View File

@ -53,7 +53,7 @@
return callback(err) return callback(err)
} }
fs.readFile(utils.certDir + 'petube.pub', 'utf8', function (err, cert) { fs.readFile(utils.certDir + 'peertube.pub', 'utf8', function (err, cert) {
if (err) { if (err) {
logger.error('Cannot read cert file.', { error: err }) logger.error('Cannot read cert file.', { error: err })
return callback(err) return callback(err)
@ -99,7 +99,7 @@
pods.makeFriends = function (callback) { pods.makeFriends = function (callback) {
logger.debug('Read public key...') logger.debug('Read public key...')
fs.readFile(utils.certDir + 'petube.pub', 'utf8', function (err, cert) { fs.readFile(utils.certDir + 'peertube.pub', 'utf8', function (err, cert) {
if (err) { if (err) {
logger.error('Cannot read public cert.', { error: err }) logger.error('Cannot read public cert.', { error: err })
return callback(err) return callback(err)

View File

@ -63,7 +63,7 @@
// Signature ? // Signature ?
if (all.method === 'POST' && all.data && all.sign === true) { if (all.method === 'POST' && all.data && all.sign === true) {
var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'petube.key.pem')) var myKey = ursa.createPrivateKey(fs.readFileSync(utils.certDir + 'peertube.key.pem'))
signature = myKey.hashAndSign('sha256', url, 'utf8', 'hex') signature = myKey.hashAndSign('sha256', url, 'utf8', 'hex')
} }
@ -111,7 +111,7 @@
} }
utils.certsExist = function (callback) { utils.certsExist = function (callback) {
fs.exists(utils.certDir + 'petube.key.pem', function (exists) { fs.exists(utils.certDir + 'peertube.key.pem', function (exists) {
return callback(exists) return callback(exists)
}) })
} }
@ -125,14 +125,14 @@
} }
logger.debug('Gen RSA keys...') logger.debug('Gen RSA keys...')
openssl.exec('genrsa', { 'out': utils.certDir + 'petube.key.pem' }, function (err) { openssl.exec('genrsa', { 'out': utils.certDir + 'peertube.key.pem' }, function (err) {
if (err) { if (err) {
logger.error('Cannot create private key on this pod.', { error: err }) logger.error('Cannot create private key on this pod.', { error: err })
return callback(err) return callback(err)
} }
logger.debug('Manage public key...') logger.debug('Manage public key...')
openssl.exec('rsa', { 'in': utils.certDir + 'petube.key.pem', 'pubout': true, 'out': utils.certDir + 'petube.pub' }, function (err) { openssl.exec('rsa', { 'in': utils.certDir + 'peertube.key.pem', 'pubout': true, 'out': utils.certDir + 'peertube.pub' }, function (err) {
if (err) { if (err) {
logger.error('Cannot create public key on this pod .', { error: err }) logger.error('Cannot create public key on this pod .', { error: err })
return callback(err) return callback(err)

View File

@ -1,3 +1,3 @@
footer footer
| PeTube, CopyLeft 2015 | PeerTube, CopyLeft 2015

View File

@ -1,24 +1,24 @@
extends layout extends layout
block content block content
div(class='container') div(class='container')
header(class='row') header(class='row')
div(class='col-md-2') div(class='col-md-2')
h4 PeopleTube h4 PeerTube
div(class='col-md-8') div(class='col-md-8')
input(type='text' id='search_video' name='search_video' class='form-control' placeholder='Search a video...') input(type='text' id='search_video' name='search_video' class='form-control' placeholder='Search a video...')
div(class='row') div(class='row')
include panel include panel
div(id='ajax_load' class='col-md-9') div(id='ajax_load' class='col-md-9')
include footer include footer
// build:js /javascripts/global.min.js // build:js /javascripts/global.min.js
script(src='/javascripts/bundle.js') script(src='/javascripts/bundle.js')
// endbuild // endbuild