diff --git a/README.md b/README.md index 6d6f43bb..535867c2 100644 --- a/README.md +++ b/README.md @@ -300,8 +300,8 @@ This project is MIT licensed. For the full license, see [LICENSE](LICENSE). ## Security -We take security seriously. Please contact security@lbry.io regarding any security issues. [Our GPG key is here](https://lbry.io/faq/gpg-key) if you need it. +We take security seriously. Please contact security@lbry.com regarding any security issues. [Our GPG key is here](https://lbry.com/faq/gpg-key) if you need it. ## Contact -The primary contact for this project is [@jessopb](mailto:jessop@lbry.io). +The primary contact for this project is [@jessopb](mailto:jessop@lbry.com). diff --git a/cli/defaults/chainqueryConfig.json b/cli/defaults/chainqueryConfig.json index 2ef4c607..571da61a 100644 --- a/cli/defaults/chainqueryConfig.json +++ b/cli/defaults/chainqueryConfig.json @@ -1,5 +1,5 @@ { - "host": "public.chainquery.lbry.io", + "host": "public.chainquery.lbry.com", "port": "3306", "timeout": 30, "database": "chainquery", diff --git a/cli/defaults/siteConfig.json b/cli/defaults/siteConfig.json index e8af29a7..3e7e0ee7 100644 --- a/cli/defaults/siteConfig.json +++ b/cli/defaults/siteConfig.json @@ -18,7 +18,7 @@ "host": "https://www.example.com", "description": "A decentralized hosting platform built on LBRY", "twitter": false, - "blockListEndpoint": "https://api.lbry.io/file/list_blocked" + "blockListEndpoint": "https://api.lbry.com/file/list_blocked" }, "publishing": { "primaryClaimAddress": null, diff --git a/client/src/components/AboutSpeechDetails/index.jsx b/client/src/components/AboutSpeechDetails/index.jsx index 606a2f1b..a49d7bb0 100644 --- a/client/src/components/AboutSpeechDetails/index.jsx +++ b/client/src/components/AboutSpeechDetails/index.jsx @@ -14,10 +14,10 @@ const AboutSpeechDetails = () => {

- Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain. + Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

- Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure. + Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the LBRY network. This means that your images are stored in multiple locations without a single point of failure.

@@ -26,7 +26,7 @@ const AboutSpeechDetails = () => { If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

- If you want to improve spee.ch, join our discord channel or solve one of our github issues. + If you want to improve spee.ch, join our discord channel or solve one of our github issues.

diff --git a/client/src/components/AssetInfoFooter/index.js b/client/src/components/AssetInfoFooter/index.js index a059f670..0742d01c 100644 --- a/client/src/components/AssetInfoFooter/index.js +++ b/client/src/components/AssetInfoFooter/index.js @@ -3,9 +3,13 @@ import Row from '@components/Row'; const AssetInfoFooter = ({ assetUrl, name }) => { return ( -
+

- Hosted via the LBRY blockchain + Hosted via the{' '} + + LBRY + {' '} + blockchain

); diff --git a/client/src/components/PublishFinePrint/index.jsx b/client/src/components/PublishFinePrint/index.jsx index a3ca6f66..085e155b 100644 --- a/client/src/components/PublishFinePrint/index.jsx +++ b/client/src/components/PublishFinePrint/index.jsx @@ -3,7 +3,7 @@ import React from 'react'; const PublishFinePrint = () => { return (

- By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. Read more. + By clicking 'Publish', you affirm that you have the rights to publish this content to the LBRY network, and that you understand the properties of publishing it to a decentralized, user-controlled network. Read more.

); }; diff --git a/client/src/containers/AssetBlocked/view.jsx b/client/src/containers/AssetBlocked/view.jsx index d2f2b14e..7d5ecdbf 100644 --- a/client/src/containers/AssetBlocked/view.jsx +++ b/client/src/containers/AssetBlocked/view.jsx @@ -17,7 +17,7 @@ class BlockedRight extends React.PureComponent { return (

In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications.

-

Click here for more information.

+

Click here for more information.

); } diff --git a/client/src/containers/AssetDisplay/view.jsx b/client/src/containers/AssetDisplay/view.jsx index c12ad741..932581a6 100644 --- a/client/src/containers/AssetDisplay/view.jsx +++ b/client/src/containers/AssetDisplay/view.jsx @@ -76,7 +76,7 @@ class AssetDisplay extends React.Component {

Sit tight, we're searching the LBRY blockchain for your asset!

-

Curious what magic is happening here? Learn more.

+

Curious what magic is happening here? Learn more.

} {(status === ERROR) && ( @@ -87,7 +87,7 @@ class AssetDisplay extends React.Component { ) : (
-

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the following error message in the LBRY discord.

+

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the following error message in the LBRY discord.

{error}

diff --git a/client/src/containers/AssetInfo/view.jsx b/client/src/containers/AssetInfo/view.jsx index 79fd1436..615c22ca 100644 --- a/client/src/containers/AssetInfo/view.jsx +++ b/client/src/containers/AssetInfo/view.jsx @@ -186,7 +186,7 @@ class AssetInfo extends React.Component { LBRY URL @@ -194,7 +194,7 @@ class AssetInfo extends React.Component { Report diff --git a/client/src/containers/PublishStatus/view.jsx b/client/src/containers/PublishStatus/view.jsx index 73212fba..828a903b 100644 --- a/client/src/containers/PublishStatus/view.jsx +++ b/client/src/containers/PublishStatus/view.jsx @@ -38,7 +38,7 @@ class PublishStatus extends React.Component {
-

Curious what magic is happening here? Learn more.

+

Curious what magic is happening here? Learn more.

} @@ -61,7 +61,7 @@ class PublishStatus extends React.Component {

{message}

-

For help, post the above error text in the #speech channel on the lbry discord

+

For help, post the above error text in the #speech channel on the lbry discord

What is spee.ch?

-

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

+

Spee.ch is a media-hosting site that reads from and publishes content to the LBRY blockchain.

OK But Why Should I Care?

@@ -38,7 +38,7 @@ class FaqPage extends React.Component {

Contribute

If you have an idea for your own spee.ch-like site on top of LBRY, fork our github repo and go to town!

-

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

+

If you want to improve spee.ch, join our discord channel or solve one of our github issues.

diff --git a/client/src/pages/MultisitePage/index.jsx b/client/src/pages/MultisitePage/index.jsx index b30bc337..30d01ccf 100644 --- a/client/src/pages/MultisitePage/index.jsx +++ b/client/src/pages/MultisitePage/index.jsx @@ -7,7 +7,7 @@ const MultisiteContent = () => {

Introducing Spee.ch Multisite

Hi there! My name is Bill, and I’d like to speak with you about Spee.ch. No, not ‘speech,’ ‘Spee.ch.’ You know what, just read on...

A Little Background

-

Wow, time flies! A little over a year ago Spee.ch was nothing more than a glimmer in the eye of LBRY CEO Jeremy Kaufman. At that time, the LBRY protocol was still so early in its development, that there were no web-based applications for interacting with the LBRY blockchain. But then, something beautiful happened. On March 29th, 2017, Jeremy sat down with Jack, and together they live coded a single-page PHP site that could publish images to the LBRY network. And just like that, Spee.ch was born!

+

Wow, time flies! A little over a year ago Spee.ch was nothing more than a glimmer in the eye of LBRY CEO Jeremy Kaufman. At that time, the LBRY protocol was still so early in its development, that there were no web-based applications for interacting with the LBRY blockchain. But then, something beautiful happened. On March 29th, 2017, Jeremy sat down with Jack, and together they live coded a single-page PHP site that could publish images to the LBRY network. And just like that, Spee.ch was born!

Being that LBRY is an open source project, Jeremy ended the session by inviting community members who were interested in the project to take the reigns and see where Spee.ch could go. I was one of the devs that did just that, and it wasn’t long before I was on a weekly call dedicated to this project with contributors from around the world.

At this point in time, the vision for Spee.ch was pretty simple: create a web-based hosting service that used the LBRY network as a database for free image and video sharing. In other words, an ‘imgur on the blockchain.’

Growth

@@ -41,7 +41,7 @@ const MultisiteContent = () => {
  • Where: Google Hangouts
  • Link: meet.google.com/aex-ghqg-kcs
  • System Requirements: If you have a server, please make sure you have MySql, Node and NPM installed. If you need help installing the above, or if you need a server to run your own instance on, please join the Hangout 30 minutes ahead of time and we will help get you set up =]
  • -
  • Questions: hello@lbry.io
  • +
  • Questions: hello@lbry.com
  • ); diff --git a/client/src/pages/ShowAssetLite/view.jsx b/client/src/pages/ShowAssetLite/view.jsx index a2f587ba..c98aa9f5 100644 --- a/client/src/pages/ShowAssetLite/view.jsx +++ b/client/src/pages/ShowAssetLite/view.jsx @@ -9,7 +9,7 @@ const AssetLiteFooter = ({ name, claimId }) => { return (

    - hosted on spee.ch via the LBRY blockchain + hosted on spee.ch via the LBRY blockchain

    ); diff --git a/client/src/pages/TosPage/index.jsx b/client/src/pages/TosPage/index.jsx index fea80880..59c2b064 100644 --- a/client/src/pages/TosPage/index.jsx +++ b/client/src/pages/TosPage/index.jsx @@ -13,15 +13,15 @@ class TosPage extends React.Component {

    Terms of Service

    Last updated: September 25, 2018

    -

    Please read these Terms of Service ("Terms", "Terms of Service") carefully before using the https://spee.ch website (the "Service") operated by LBRY INC ("us", "we", or "our").

    +

    Please read these Terms of Service ("Terms", "Terms of Service") carefully before using the https://spee.ch website (the "Service") operated by LBRY INC ("us", "we", or "our").

    Your access to and use of the Service is conditioned upon your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who wish to access or use the Service.

    By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you do not have permission to access the Service.

    Links To Other Web Sites

    -

    Our Service may contain links to third party web sites or services that are not owned or controlled by LBRY INC

    -

    LBRY INC has no control over, and assumes no responsibility for the content, privacy policies, or practices of any third party web sites or services. We do not warrant the offerings of any of these entities/individuals or their websites.

    -

    You acknowledge and agree that LBRY INC shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such third party web sites or services.

    +

    Our Service may contain links to third party web sites or services that are not owned or controlled by LBRY INC

    +

    LBRY INC has no control over, and assumes no responsibility for the content, privacy policies, or practices of any third party web sites or services. We do not warrant the offerings of any of these entities/individuals or their websites.

    +

    You acknowledge and agree that LBRY INC shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such third party web sites or services.

    We strongly advise you to read the terms and conditions and privacy policies of any third party web sites or services that you visit.

    @@ -35,12 +35,12 @@ class TosPage extends React.Component {

    Limitation Of Liability

    -

    In no event shall LBRY INC, nor its directors, employees, partners, agents, suppliers, or affiliates, be liable for any indirect, incidental, special, consequential or punitive damages, including without limitation, loss of profits, data, use, goodwill, or other intangible losses, resulting from (i) your access to or use of or inability to access or use the Service; (ii) any conduct or content of any third party on the Service; (iii) any content obtained from the Service; and (iv) unauthorized access, use or alteration of your transmissions or content, whether based on warranty, contract, tort (including negligence) or any other legal theory, whether or not we have been informed of the possibility of such damage, and even if a remedy set forth herein is found to have failed of its essential purpose.

    +

    In no event shall LBRY INC, nor its directors, employees, partners, agents, suppliers, or affiliates, be liable for any indirect, incidental, special, consequential or punitive damages, including without limitation, loss of profits, data, use, goodwill, or other intangible losses, resulting from (i) your access to or use of or inability to access or use the Service; (ii) any conduct or content of any third party on the Service; (iii) any content obtained from the Service; and (iv) unauthorized access, use or alteration of your transmissions or content, whether based on warranty, contract, tort (including negligence) or any other legal theory, whether or not we have been informed of the possibility of such damage, and even if a remedy set forth herein is found to have failed of its essential purpose.

    Disclaimer

    Your use of the Service is at your sole risk. The Service is provided on an "AS IS" and "AS AVAILABLE" basis. The Service is provided without warranties of any kind, whether express or implied, including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, non-infringement or course of performance.

    -

    LBRY INC its subsidiaries, affiliates, and its licensors do not warrant that a) the Service will function uninterrupted, secure or available at any particular time or location; b) any errors or defects will be corrected; c) the Service is free of viruses or other harmful components; or d) the results of using the Service will meet your requirements.

    +

    LBRY INC its subsidiaries, affiliates, and its licensors do not warrant that a) the Service will function uninterrupted, secure or available at any particular time or location; b) any errors or defects will be corrected; c) the Service is free of viruses or other harmful components; or d) the results of using the Service will meet your requirements.

    Exclusions

    @@ -58,7 +58,7 @@ class TosPage extends React.Component {

    Contact Us

    -

    If you have any questions about these Terms, please contact us.

    +

    If you have any questions about these Terms, please contact us.

    diff --git a/fullstart.md b/fullstart.md index f6e11758..9f5d0ab7 100644 --- a/fullstart.md +++ b/fullstart.md @@ -1,74 +1,82 @@ # Create Your Own Spee.ch! ## 1. Prerequisites + ### You will need the following tools installed -* Node (v8 LTS). -* Make sure you install from the **Node** website [link](https://nodejs.org/en/download/). -* npm (should come installed with Node). -* Git -* Curl -* Tmux -* Unzip +- Node (v8 LTS). +- Make sure you install from the **Node** website [link](https://nodejs.org/en/download/). +- npm (should come installed with Node). +- Git +- Curl +- Tmux +- Unzip ### Make sure **npm** is up-to-date. + ``` $ npm update ``` ### Setup a Webserver to serve **Spee.ch** from Port **3000**. -* If you are using a server provided by **lbry**, we will have **caddy** installed already. -* If you are using your own server, make sure to have a web server installed and set up to serve from port **3000**. -* Nginx instructions (recommended). - * Insert directions for certbot before installing. - * Install [Nginx](http://nginx.org/en/docs/install.html). - * Create a config file called `spee.ch` in */etc/nginx/sites-available* - * see example: [config file](https://github.com/lbryio/spee.ch/blob/master/nginx_example_config). - * Rename all mentions of *sub.domain.com* with your subdomain name. - * Run this command to link the sites-available. + +- If you are using a server provided by **lbry**, we will have **caddy** installed already. +- If you are using your own server, make sure to have a web server installed and set up to serve from port **3000**. +- Nginx instructions (recommended). + + - Insert directions for certbot before installing. + - Install [Nginx](http://nginx.org/en/docs/install.html). + - Create a config file called `spee.ch` in _/etc/nginx/sites-available_ + - see example: [config file](https://github.com/lbryio/spee.ch/blob/master/nginx_example_config). + - Rename all mentions of _sub.domain.com_ with your subdomain name. + - Run this command to link the sites-available. `$ ln -s /etc/nginx/sites-available/speech /etc/nginx/sites-enabled/speech` - * Restart Nginx. + - Restart Nginx. `$ sudo service nginx restart` - * Try visiting your website. - * If Nginx is working, you should get a **502** error because there is nothing running on **3000** yet. - * If you get the default Nginx greeting, you have not properly configured it to serve from port **3000**. - * You can find logs in */var/log/nginx/* too. - * Caddy tutorial: [https://caddyserver.com/tutorial](https://caddyserver.com/tutorial) + - Try visiting your website. + - If Nginx is working, you should get a **502** error because there is nothing running on **3000** yet. + - If you get the default Nginx greeting, you have not properly configured it to serve from port **3000**. + - You can find logs in _/var/log/nginx/_ too. + - Caddy tutorial: [https://caddyserver.com/tutorial](https://caddyserver.com/tutorial) + ### MySql -* Install MySql - * [Instructions](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en) -* Create user **root**. - * Note: We are going to access **mysql** as **root** for this setup, but you may want to create a separate user in the future. - * Keep your password somewhere handy! -* Create a database called **lbry** and make sure you can use it. +- Install MySql + - [Instructions](https://dev.mysql.com/doc/mysql-installation-excerpt/5.7/en) +- Create user **root**. \* Note: We are going to access **mysql** as **root** for this setup, but you may want to create a separate user in the future. + - Keep your password somewhere handy! +- Create a database called **lbry** and make sure you can use it. - `CREATE DATABASE lbry;` + `CREATE DATABASE lbry;` - `$ USE lbry;` + `$ USE lbry;` - `$ exit; (or press ‘ctl + d’)` + `$ exit; (or press ‘ctl + d’)` -* Try logging into mysql. +- Try logging into mysql. - `$ mysql -u username -p` + `$ mysql -u username -p` -* If you are using a **LBRY** server, your **password** is the one provided for **ssh**. - * Note: If it fails, try using `sudo`. +- If you are using a **LBRY** server, your **password** is the one provided for **ssh**. + - Note: If it fails, try using `sudo`. -##2. Install & Run the LBRY Daemon +##2. Install & Run the LBRY Daemon ### Install **lbrynet** + _note: if you have a server from LBRY, lbrynet is already installed, you can skip to 2.4._ + ``` -$ wget --quiet -O ~/latest_daemon.zip https://lbry.io/get/lbrynet.linux.zip +$ wget --quiet -O ~/latest_daemon.zip https://lbry.com/get/lbrynet.linux.zip $ unzip -o -u "~/latest_daemon.zip" ``` + ### Start lbrynet + ``` $ tmux $ ./lbrynet-daemon @@ -100,7 +108,7 @@ You should have **LBC**! directions: [here](https://www.ffmpeg.org/download.html) -## 3. Set up Spee.ch +## 3. Set up Spee.ch ### Clone the spee.ch repo @@ -127,6 +135,7 @@ $ npm run configure ``` Check your site configs + ``` $ cd /site/config/ $ nano siteConfig.json @@ -135,6 +144,7 @@ $ nano siteConfig.json ### Build & run Run the below command to transpile, build, and start your server. + ``` $ npm run start ``` @@ -145,17 +155,18 @@ Spee.ch should now be running ! Visit your site in the browser. Try publishing an image! - ## 4. Bonus: ### Install PM2 and run your server with PM2 Install PM2 + ``` $ sudo npm i -g pm2 ``` From inside your project’s folder, start your server with PM2. + ``` $ pm2 start server.js ``` diff --git a/server/controllers/api/claim/longId/index.js b/server/controllers/api/claim/longId/index.js index d9c5b491..3e7313a4 100644 --- a/server/controllers/api/claim/longId/index.js +++ b/server/controllers/api/claim/longId/index.js @@ -36,7 +36,7 @@ const claimLongId = ({ ip, originalUrl, body, params }, res) => { return db.Blocked.isNotBlocked(outpoint); }) .then(() => { - res.status(200).json({success: true, data: claimId}); + res.status(200).json({ success: true, data: claimId }); }) .catch(error => { if (error === NO_CLAIM) { @@ -54,7 +54,8 @@ const claimLongId = ({ ip, originalUrl, body, params }, res) => { if (error === BLOCKED_CLAIM) { return res.status(410).json({ success: false, - message: 'In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications. For more details, see https://lbry.io/faq/dmca', + message: + 'In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications. For more details, see https://lbry.com/faq/dmca', }); } handleErrorResponse(originalUrl, ip, error, res); diff --git a/server/controllers/assets/utils/getClaimIdAndServeAsset.js b/server/controllers/assets/utils/getClaimIdAndServeAsset.js index 00639321..60df4e74 100644 --- a/server/controllers/assets/utils/getClaimIdAndServeAsset.js +++ b/server/controllers/assets/utils/getClaimIdAndServeAsset.js @@ -118,7 +118,7 @@ const getClaimIdAndServeAsset = ( return res.status(451).json({ success: false, message: - 'In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications. For more details, see https://lbry.io/faq/dmca', + 'In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications. For more details, see https://lbry.com/faq/dmca', }); } if (error === NO_FILE) { diff --git a/server/index.js b/server/index.js index d423ffac..e3806779 100644 --- a/server/index.js +++ b/server/index.js @@ -75,7 +75,7 @@ function Server() { res .status(403) .send( - '

    Forbidden

    If you are seeing this by mistake, please contact us using https://chat.lbry.io/' + '

    Forbidden

    If you are seeing this by mistake, please contact us using https://chat.lbry.com/' ); res.end(); } else { @@ -195,7 +195,7 @@ function Server() { 'Continuing with default LBRY blocklist api endpoint. \n ' + '(Specify /"blockListEndpoint" : ""/ to disable.' ); - finalBlockListEndpoint = 'https://api.lbry.io/file/list_blocked'; + finalBlockListEndpoint = 'https://api.lbry.com/file/list_blocked'; } } logger.info(`Peforming updates...`); diff --git a/server/middleware/autoblockPublishMiddleware.js b/server/middleware/autoblockPublishMiddleware.js index 4c4456fb..426323a1 100644 --- a/server/middleware/autoblockPublishMiddleware.js +++ b/server/middleware/autoblockPublishMiddleware.js @@ -1,9 +1,12 @@ const fs = require('fs'); const logger = require('winston'); -const { publishing: { publishingChannelWhitelist } } = require('@config/siteConfig'); +const { + publishing: { publishingChannelWhitelist }, +} = require('@config/siteConfig'); const ipBanFile = './site/config/ipBan.txt'; -const forbiddenMessage = '

    Forbidden

    If you are seeing this by mistake, please contact us using https://chat.lbry.io/'; +const forbiddenMessage = + '

    Forbidden

    If you are seeing this by mistake, please contact us using https://chat.lbry.com/'; let ipCounts = {}; let blockedAddresses = []; @@ -13,7 +16,7 @@ if (fs.existsSync(ipBanFile)) { input: require('fs').createReadStream(ipBanFile), }); - lineReader.on('line', (line) => { + lineReader.on('line', line => { if (line && line !== '') { blockedAddresses.push(line); } @@ -30,7 +33,7 @@ const autoblockPublishMiddleware = (req, res, next) => { return; } - let count = ipCounts[ip] = (ipCounts[ip] || 0) + 1; + let count = (ipCounts[ip] = (ipCounts[ip] || 0) + 1); setTimeout(() => { if (ipCounts[ip]) {