mirror of
https://gitea.invidious.io/iv-org/documentation.git
synced 2024-08-15 00:53:34 +00:00
Compare commits
15 commits
4775b1e0de
...
7d074c40ce
Author | SHA1 | Date | |
---|---|---|---|
|
7d074c40ce | ||
|
3c2356b9b4 | ||
|
ee58285ebd | ||
|
7af7f1c7a1 | ||
|
0ff04d68bc | ||
|
5b5830b38b | ||
|
8e451d4365 | ||
|
775e3ed3ea | ||
|
f14d71df20 | ||
|
ea4d456cb4 | ||
|
4d7250c23c | ||
|
7914e9b17f | ||
|
46be89fc3b | ||
|
14b5cf21db | ||
|
3fdb026ca8 |
7 changed files with 202 additions and 27 deletions
149
.github/workflows/add-instance-updown.yml
vendored
Normal file
149
.github/workflows/add-instance-updown.yml
vendored
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
name: Add instance to updown.io
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
replycomment:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions: write-all
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
if: contains(github.event.issue.labels.*.name, 'instance-add')
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
if: contains(github.event.issue.labels.*.name, 'instance-add')
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- run: npm install request linkifyjs
|
||||||
|
if: contains(github.event.issue.labels.*.name, 'instance-add')
|
||||||
|
- uses: actions/github-script@v6
|
||||||
|
if: contains(github.event.issue.labels.*.name, 'instance-add')
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
var issueInfo = (await github.rest.issues.get({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
})).data;
|
||||||
|
var linkify = require("linkifyjs");
|
||||||
|
var issueTitleParseUrl = linkify.find(issueInfo.title);
|
||||||
|
if (issueTitleParseUrl.length !== 0) {
|
||||||
|
if (issueInfo.title.includes(".onion")) {
|
||||||
|
var replyComment =
|
||||||
|
['Hello! I have detected that you are requesting to add an onion URL.',
|
||||||
|
'Please create a pull request instead for adding your onion url as an alternative to your clearnet URL: https://github.com/iv-org/documentation/edit/master/docs/instances.md'
|
||||||
|
].join('\n');
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: replyComment
|
||||||
|
});
|
||||||
|
await github.rest.issues.update({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
state: 'closed'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var instanceHostname = (new URL(issueTitleParseUrl[0].href)).hostname;
|
||||||
|
var request = require("request");
|
||||||
|
var optionsAddNewCheck = { method: 'POST',
|
||||||
|
url: 'https://updown.io/api/checks?api-key=${{ secrets.UPDOWN_API_KEY }}',
|
||||||
|
json:true,
|
||||||
|
headers:
|
||||||
|
{ 'content-type': 'application/x-www-form-urlencoded' },
|
||||||
|
form:
|
||||||
|
{ url: 'https://' + instanceHostname,
|
||||||
|
period: '300',
|
||||||
|
mute_until: 'forever',
|
||||||
|
published: 'true',
|
||||||
|
alias: instanceHostname,
|
||||||
|
string_match: 'An alternative front-end to YouTube' } };
|
||||||
|
|
||||||
|
|
||||||
|
request(optionsAddNewCheck, async function (error, response, body) {
|
||||||
|
if (error) throw new Error(error);
|
||||||
|
console.log(body);
|
||||||
|
if (body.token) {
|
||||||
|
var optionsGetStatusPages = {
|
||||||
|
method: 'GET',
|
||||||
|
url: 'https://updown.io/api/status_pages?api-key=${{ secrets.UPDOWN_API_KEY }}',
|
||||||
|
json: true
|
||||||
|
};
|
||||||
|
|
||||||
|
request(optionsGetStatusPages, async function (error, response, body) {
|
||||||
|
if (error) throw new Error(error);
|
||||||
|
const statusPage = body.filter(element => element.token === "resvf");
|
||||||
|
let checksOfStatusPage = statusPage[0].checks;
|
||||||
|
|
||||||
|
checksOfStatusPage.push(body.token)
|
||||||
|
|
||||||
|
var optionsAddCheckToStatusPage = {
|
||||||
|
method: 'PUT',
|
||||||
|
url: 'https://updown.io/api/status_pages/resvf?api-key=${{ secrets.UPDOWN_API_KEY }}',
|
||||||
|
headers: {
|
||||||
|
'content-type': 'application/json'
|
||||||
|
},
|
||||||
|
json: {checks: checksOfStatusPage}
|
||||||
|
};
|
||||||
|
|
||||||
|
request(optionsAddCheckToStatusPage, async function (error, response, body) {
|
||||||
|
if (error) throw new Error(error);
|
||||||
|
|
||||||
|
console.log(body)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var replyComment =
|
||||||
|
['Hello! Your instance has been added to our monitoring system: https://updown.io/' + body.token,
|
||||||
|
'You need to wait 30 days before we add your instance, this is to evaluate that your instance will keep a good uptime for one month.',
|
||||||
|
'',
|
||||||
|
'Make sure you double checked all the mandatory checks or this will slow down the process of adding your instance!',
|
||||||
|
'',
|
||||||
|
'Please consult these two important tutorials:',
|
||||||
|
'',
|
||||||
|
'- Escaping the YouTube block ([403 errors in playback](https://github.com/iv-org/invidious/issues/4045)): https://docs.invidious.io/ipv6-rotator/',
|
||||||
|
'',
|
||||||
|
'- Improving the performance and the stability of your public instance: https://docs.invidious.io/improve-public-instance/',
|
||||||
|
'',
|
||||||
|
'It is highly recommended to follow these tutorials because it will allow the instance to stay stable and performant over the long term.',
|
||||||
|
'',
|
||||||
|
'Please consider joining the Matrix room for public instance maintainers by joining our Matrix room: https://matrix.to/#/#invidious:matrix.org',
|
||||||
|
'then pinging @ unixfox, @ TheFrenchGhosty and @ SamantazFox for asking to be invited to the Matrix room.',
|
||||||
|
'We discuss troubles managing a public instance, sharing some advices and more.'
|
||||||
|
].join('\n');
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: replyComment
|
||||||
|
})
|
||||||
|
await github.rest.issues.addLabels({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
labels: ['wait-30-days']
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var replyComment =
|
||||||
|
['Domain not detected in the title, please edit the title by correcting it like this:',
|
||||||
|
'Issue title example: `[New instance] https://myinstance.com`'
|
||||||
|
].join('\n');
|
||||||
|
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
body: replyComment
|
||||||
|
})
|
||||||
|
}
|
|
@ -83,9 +83,9 @@ jobs:
|
||||||
'',
|
'',
|
||||||
'It is highly recommended to follow these tutorials because it will allow the instance to stay stable and performant over the long term.',
|
'It is highly recommended to follow these tutorials because it will allow the instance to stay stable and performant over the long term.',
|
||||||
'',
|
'',
|
||||||
'Please consider joining the Matrix room for public instance maintainers by joining our Matrix room: https://matrix.to/#/#invidious:matrix.org',
|
'When your instance is added to the instances list, please consider joining the Matrix room for public instance maintainers by joining our Matrix room: https://matrix.to/#/#invidious:matrix.org',
|
||||||
'then pinging @ unixfox, @ TheFrenchGhosty and @ SamantazFox for asking to be invited to the Matrix room.',
|
'and pinging @ unixfox, @ TheFrenchGhosty and @ SamantazFox to ask to be invited to it.',
|
||||||
'We discuss troubles managing a public instance, sharing some advices and more.'
|
'We discuss troubles managing a public instance, we share some advices, we warn you in advance of potential security issues and more.'
|
||||||
].join('\n');
|
].join('\n');
|
||||||
await github.rest.issues.createComment({
|
await github.rest.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
|
|
|
@ -4,14 +4,6 @@
|
||||||
|
|
||||||
All endpoints that return a JSON body support `&hl=LANGUAGE` for translating fields into the desired language. A list of languages are provided in [List of URL parameters](./url-parameters.md).
|
All endpoints that return a JSON body support `&hl=LANGUAGE` for translating fields into the desired language. A list of languages are provided in [List of URL parameters](./url-parameters.md).
|
||||||
|
|
||||||
### Pretty
|
|
||||||
|
|
||||||
All endpoints that return a JSON body support `&pretty=1` for printing the response as formatted JSON.
|
|
||||||
|
|
||||||
### Fields
|
|
||||||
|
|
||||||
All endpoints that return a JSON body support the [fields API](https://developers.google.com/youtube/v3/getting-started#fields) for specifying desired fields to reduce bandwidth consumption. This can be used by adding `&fields=FIELDS` with the desired fields, for example [`/api/v1/videos/aqz-KE-bpKQ?fields=videoId,title,description&pretty=1`](https://invidio.us/api/v1/videos/aqz-KE-bpKQ?fields=videoId,title,description&pretty=1).
|
|
||||||
|
|
||||||
##### GET `/api/v1/stats`
|
##### GET `/api/v1/stats`
|
||||||
|
|
||||||
> Schema:
|
> Schema:
|
||||||
|
|
|
@ -114,7 +114,7 @@ Provides an [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/Event
|
||||||
|
|
||||||
Important to note is that an event will also be sent when a channel _changes_ an already uploaded video, for example changing description or title.
|
Important to note is that an event will also be sent when a channel _changes_ an already uploaded video, for example changing description or title.
|
||||||
|
|
||||||
Each event is a JSON object with the same schema as `/api/v1/videos`. The `fields` API can be used, which will be applied to each object.
|
Each event is a JSON object with the same schema as `/api/v1/videos`.
|
||||||
|
|
||||||
A `debug` topic can also provided which will return a (psuedo-)randomly selected video every minute.
|
A `debug` topic can also provided which will return a (psuedo-)randomly selected video every minute.
|
||||||
|
|
||||||
|
@ -418,3 +418,33 @@ Example request:
|
||||||
```
|
```
|
||||||
|
|
||||||
Returns 204 on success.
|
Returns 204 on success.
|
||||||
|
|
||||||
|
##### GET `/api/v1/auth/history`
|
||||||
|
|
||||||
|
Get the history of videos played by the user.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
```
|
||||||
|
max_results: Int32
|
||||||
|
page: Int32
|
||||||
|
```
|
||||||
|
|
||||||
|
> Schema:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
[
|
||||||
|
// video IDs
|
||||||
|
]
|
||||||
|
```
|
||||||
|
##### POST `/api/v1/auth/history/:id`
|
||||||
|
|
||||||
|
Set a video as watched.
|
||||||
|
|
||||||
|
Returns 204 on success.
|
||||||
|
|
||||||
|
##### DELETE `/api/v1/auth/history/:id`
|
||||||
|
|
||||||
|
Delete a video from the user watched history.
|
||||||
|
|
||||||
|
Returns 204 on success.
|
|
@ -17,6 +17,7 @@ Lists of third-party projects that use or support Invidious.
|
||||||
| [GTK+ Pipe Viewer](https://github.com/trizen/pipe-viewer) | YouTube client for Linux. | |
|
| [GTK+ Pipe Viewer](https://github.com/trizen/pipe-viewer) | YouTube client for Linux. | |
|
||||||
| [PlasmaTube](https://invent.kde.org/multimedia/plasmatube/) | YouTube client for Linux. | [KDE Applications](https://apps.kde.org/plasmatube/) |
|
| [PlasmaTube](https://invent.kde.org/multimedia/plasmatube/) | YouTube client for Linux. | [KDE Applications](https://apps.kde.org/plasmatube/) |
|
||||||
| [yt2alt](https://github.com/iBicha/yt2alt) | A cli tool to import your profile from Youtube to an alternative platform. | |
|
| [yt2alt](https://github.com/iBicha/yt2alt) | A cli tool to import your profile from Youtube to an alternative platform. | |
|
||||||
|
| [Materialious](https://github.com/WardPearce/Materialious) | Modern material design for Invidious. | |
|
||||||
|
|
||||||
### Browser Extensions
|
### Browser Extensions
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ git clone https://github.com/iv-org/invidious
|
||||||
exit
|
exit
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Set up PostgresSQL
|
#### Set up PostgreSQL
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl enable --now postgresql
|
systemctl enable --now postgresql
|
||||||
|
@ -177,14 +177,22 @@ systemctl enable --now invidious.service
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew update
|
brew update
|
||||||
brew install shards crystal postgres imagemagick librsvg
|
brew install crystal postgresql imagemagick librsvg
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Set up PostgresSQL
|
#### Clone the Invidious repository
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/iv-org/invidious
|
||||||
|
cd invidious
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Set up PostgreSQL
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew services start postgresql
|
brew services start postgresql
|
||||||
psql -c "CREATE ROLE kemal WITH PASSWORD 'kemal';" # Change 'kemal' here to a stronger password, and update `password` in config/config.yml
|
createdb
|
||||||
|
psql -c "CREATE ROLE kemal WITH LOGIN PASSWORD 'kemal';" # Change 'kemal' here to a stronger password, and update `password` in config/config.yml
|
||||||
createdb -O kemal invidious
|
createdb -O kemal invidious
|
||||||
psql invidious kemal < config/sql/channels.sql
|
psql invidious kemal < config/sql/channels.sql
|
||||||
psql invidious kemal < config/sql/videos.sql
|
psql invidious kemal < config/sql/videos.sql
|
||||||
|
@ -193,7 +201,6 @@ psql invidious kemal < config/sql/users.sql
|
||||||
psql invidious kemal < config/sql/session_ids.sql
|
psql invidious kemal < config/sql/session_ids.sql
|
||||||
psql invidious kemal < config/sql/nonces.sql
|
psql invidious kemal < config/sql/nonces.sql
|
||||||
psql invidious kemal < config/sql/annotations.sql
|
psql invidious kemal < config/sql/annotations.sql
|
||||||
psql invidious kemal < config/sql/privacy.sql
|
|
||||||
psql invidious kemal < config/sql/playlists.sql
|
psql invidious kemal < config/sql/playlists.sql
|
||||||
psql invidious kemal < config/sql/playlist_videos.sql
|
psql invidious kemal < config/sql/playlist_videos.sql
|
||||||
```
|
```
|
||||||
|
@ -201,12 +208,10 @@ psql invidious kemal < config/sql/playlist_videos.sql
|
||||||
#### Set up Invidious
|
#### Set up Invidious
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/iv-org/invidious
|
make
|
||||||
cd invidious
|
|
||||||
shards install --production
|
# Configure config/config.yml as you like
|
||||||
crystal build src/invidious.cr --release
|
|
||||||
cp config/config.example.yml config/config.yml
|
cp config/config.example.yml config/config.yml
|
||||||
# Configure config/config.yml how you want
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Invidious Instances
|
# Invidious Instances
|
||||||
|
|
||||||
[Uptime History provided by Uptimerobot](https://stats.uptimerobot.com/89VnzSKAn)
|
[Uptime History provided by updown.io](https://uptime.invidious.io)
|
||||||
|
|
||||||
[Instances API](https://api.invidious.io/)
|
[Instances API](https://api.invidious.io/)
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
* [invidious.flokinet.to](https://invidious.flokinet.to) 🇷🇴
|
* [invidious.flokinet.to](https://invidious.flokinet.to) 🇷🇴
|
||||||
|
|
||||||
* [invidious.projectsegfau.lt](https://invidious.projectsegfau.lt) 🇫🇷
|
* [invidious.projectsegfau.lt](https://invidious.projectsegfau.lt) 🇩🇪
|
||||||
|
|
||||||
* [invidious.privacydev.net](https://invidious.privacydev.net) 🇫🇷
|
* [invidious.privacydev.net](https://invidious.privacydev.net) 🇫🇷
|
||||||
|
|
||||||
|
@ -54,8 +54,6 @@
|
||||||
|
|
||||||
* [invidious.nerdvpn.de](https://invidious.nerdvpn.de) 🇺🇦
|
* [invidious.nerdvpn.de](https://invidious.nerdvpn.de) 🇺🇦
|
||||||
|
|
||||||
* [inv.n8pjl.ca](https://inv.n8pjl.ca) 🇨🇦
|
|
||||||
|
|
||||||
* [invidious.jing.rocks](https://invidious.jing.rocks) 🇯🇵
|
* [invidious.jing.rocks](https://invidious.jing.rocks) 🇯🇵
|
||||||
|
|
||||||
* [vid.lilay.dev](https://vid.lilay.dev) 🇸🇬 (uses Cloudflare)
|
* [vid.lilay.dev](https://vid.lilay.dev) 🇸🇬 (uses Cloudflare)
|
||||||
|
@ -72,7 +70,7 @@
|
||||||
|
|
||||||
* [invidious.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion](http://invidious.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion) 🇫🇷 (Onion of invidious.privacydev.net)
|
* [invidious.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion](http://invidious.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion) 🇫🇷 (Onion of invidious.privacydev.net)
|
||||||
|
|
||||||
* [inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion](http://inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion) 🇫🇷 (Onion of invidious.projectsegfau.lt)
|
* [inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion](http://inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion) 🇩🇪 (Onion of invidious.projectsegfau.lt)
|
||||||
|
|
||||||
* [inv.nadekonw7plitnjuawu6ytjsl7jlglk2t6pyq6eftptmiv3dvqndwvyd.onion](http://inv.nadekonw7plitnjuawu6ytjsl7jlglk2t6pyq6eftptmiv3dvqndwvyd.onion) 🇨🇱 (Onion of inv.nadeko.net)
|
* [inv.nadekonw7plitnjuawu6ytjsl7jlglk2t6pyq6eftptmiv3dvqndwvyd.onion](http://inv.nadekonw7plitnjuawu6ytjsl7jlglk2t6pyq6eftptmiv3dvqndwvyd.onion) 🇨🇱 (Onion of inv.nadeko.net)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue