lavalink-client 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +187 -0
  3. package/package.json +26 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Tomato6966
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,187 @@
1
+ # lavalink-client
2
+ Easy and advanced lavalink client. Use it with lavalink plugins as well as latest lavalink versions
3
+
4
+
5
+ ### What is Lavalink?
6
+ - Lavalink is an open-source Discord Queue Manager and Audioplayer, as well as scraper.
7
+
8
+ *Coming soon*
9
+
10
+
11
+
12
+ ## How to self Host Lavalink
13
+
14
+ <details>
15
+ <summary>
16
+ 👉 Click here to see how to self host a Lavalink instance
17
+ </summary>
18
+
19
+ ### Requirements - JAVA
20
+ - [v18](https://github.com/Tomato6966/Debian-Cheat-Sheat-Setup/wiki/3.5.7-java-18) - for Lavalink@latest (v3.5+ or rc*)
21
+ - [v13](https://github.com/Tomato6966/Debian-Cheat-Sheat-Setup/wiki/3.5.3-java-13) - for Lavalink v3.3-v3.4
22
+ - [v11](https://github.com/Tomato6966/Debian-Cheat-Sheat-Setup/wiki/3.5.2-java-11) - for all older Versions
23
+
24
+ ### Installation
25
+ - First download the [Lavalink executeable File v3.6.2](https://github.com/freyacodes/Lavalink/releases/download/3.6.2/Lavalink.jar): [from the releases page](https://github.com/freyacodes/Lavalink/releases)
26
+ ```
27
+ wget https://github.com/freyacodes/Lavalink/releases/download/3.6.2/Lavalink.jar
28
+ ```
29
+ - Then download my [example **configuration File** application.yml](https://raw.githubusercontent.com/Tomato6966/Debian-Cheat-Sheet-Setup/main/application.yml) | [Example application.yml from official repo - LINK](https://github.com/freyacodes/Lavalink/blob/master/LavalinkServer/application.yml.example)
30
+ ```
31
+ wget https://raw.githubusercontent.com/Tomato6966/Debian-Cheat-Sheet-Setup/main/application.yml
32
+ ```
33
+ *Make sure the file-name is equal to: `application.yml` and is in the same Directory as the `Lavalink.jar` file*
34
+
35
+ **NOTE:** If you don't wanna use the spotify plugin, or any other sources Plugin, then remove it from MY EXAMPLE application.yml
36
+ > other wise you'd get errors. as far this is just a note-cheatsheet FOR ME
37
+
38
+ # Plugins Example
39
+ - In the server config Level of the applicatino.yml for `plugins` you can find all plugins and their versions which will be downloaded
40
+
41
+ # Edit Application.yml
42
+ make sure to edit:
43
+ - **port** to access Lavalink from a different Port
44
+ - **password** so that you have a password
45
+ - **spotify** -> **clientId** & **clientSecret** [get them from here](https://developer.spotify.com/dashboard/applications)
46
+ - **deezer** -> **masterEncryptionKey** [find it out yourself, how to get it](https://github.com/yne/dzr/issues/11)
47
+ - All other values to fit your needs
48
+
49
+ # Start Lavalink
50
+
51
+ in the folder of `Lavalink.jar` and `application.yml` execute the following
52
+ ```bash
53
+ java -jar Lavalink.jar
54
+ ```
55
+
56
+ # How to start it 24/7 - 2 Methods
57
+
58
+ - pm2:
59
+
60
+ ```bash
61
+ npm i -g pm2; # add pm2 to the system
62
+ pm2 start --name Lavalink --max-memory-restart 4G java -- -jar Lavalink.jar
63
+ ```
64
+
65
+ - screen:
66
+ ```bash
67
+ apt-get install screen
68
+ screen -t Lavalink -s Lavalink
69
+ java -jar Lavalink # in the screen window:
70
+
71
+ # strg + alt + a + d -> to exit
72
+ # screen -ls to view all screens
73
+ # screen -r <ID> to re-enter a screen
74
+
75
+ # How to connect to it?
76
+
77
+ you need the following information:
78
+ - host: `localhost` | `127.0.0.1` | `IPV4 Address` (only works if firewall allows it)
79
+ - port: `2333` | `defined_port`
80
+ - password: `youshallnotpass` | `defined_port`
81
+
82
+
83
+ # Recommendation
84
+
85
+ Start using ipv6 routating, to prevent an ip ban from youtube!
86
+ check [here](https://github.com/freyacodes/Lavalink/issues/369) for more infos and for how to use tunnelbroker to get an ipv6 address-block, if you don't have one
87
+
88
+ ## How to do ip routing notes:
89
+
90
+ First enable allowments for ipv6
91
+
92
+ ```
93
+ # Enable now
94
+ sysctl -w net.ipv6.ip_nonlocal_bind=1
95
+ # Persist for next boot
96
+ echo 'net.ipv6.ip_nonlocal_bind = 1' >> /etc/sysctl.conf
97
+ ```
98
+
99
+ replace `1234:1234:1234::/64` with your BLOCK (e.g. `2a01:12ab:12::/64`), if it's a /48 then it's `1234:1234:1234::/48` ofc.
100
+
101
+ ```
102
+ ip -6 route replace local 1234:1234:1234::/64 dev lo
103
+ ```
104
+ Don't know how to route it with netplan / interfaces? Ask your provider or do:
105
+ ```
106
+ ip add add local 1234:1234:1234::/64 dev lo
107
+ ```
108
+
109
+ Test the config
110
+
111
+ ```
112
+ # Test that IPv6 works in the first place
113
+ ping6 google.com
114
+
115
+ # If you have the IPv6 block 1234:1234:1234::/48
116
+ # You should be able to use any of the IPs within that block
117
+ ping6 -I 1234:1234:1234:: -c 2 google.com
118
+ ping6 -I 1234:1234:1234::1 -c 2 google.com
119
+ ping6 -I 1234:1234:1234::2 -c 2 google.com
120
+ ping6 -I 1234:1234:1234:dead:beef:1234:1234 -c 2 google.com
121
+ ```
122
+
123
+ **IF you get could not assign requested address, then it's not routed to your system..**
124
+
125
+ **IF YOU GET 100% PACKET LOSS THEN EVERYTHING IS OKAY DO THE FOLLOWING:**
126
+ ```
127
+ # Install routing proxy
128
+ sudo apt-get -y install ndppd
129
+ # Create / edit it's config file
130
+ nano /etc/ndppd.conf
131
+ # Next paste the following: again replace the block with your block
132
+
133
+ route-ttl 30000
134
+
135
+ proxy enp1s0 { # your interface name
136
+ router no # If it should send router bit | default: yes
137
+ timeout 500 # How long (in ms) it waits to assign a request address (lower == faster but more unstable) | default: 500
138
+ ttl 30000 # How long (in ms) it caches an Ip Address (for lavalink you can def. set this one to 3600000 | default: 30000
139
+ rule 1234:1234:1234::/64{
140
+ static # to respond immediatelly
141
+ }
142
+ }
143
+ ```
144
+
145
+ Before saving replace `enp1s0` with your interface block name
146
+
147
+ It's findable with: ip addr
148
+ there are multiple, just find the name of the one where your ipv6 Block is in!
149
+
150
+ **NOW START ndppd**
151
+
152
+ ```
153
+ ndppd -d -c /etc/ndppd.conf
154
+ # Restart: systemctl restart ndppd
155
+ # Stop: systemctl stop ndppd
156
+ # Status : systemctl status ndppd
157
+ # Start: systemctl start ndppd
158
+ ```
159
+
160
+ If apt-install fails do this:
161
+ ```
162
+ wget http://data.vshell.net/files/ndppd-0.2.5.tar.gz
163
+ tar -zxvf ndppd-0.2.5.tar.gz
164
+ cd ndppd-0.2.5
165
+ make
166
+ make install
167
+ ```
168
+
169
+
170
+ How does my /etc/ndppd.conf look like?
171
+ ```
172
+ route-ttl 3600000
173
+ proxy enp1s0 {
174
+ router yes
175
+ timeout 50
176
+ ttl 3600000
177
+ rule 2423:2220:123:1234::/64{
178
+ static
179
+ }
180
+ }
181
+ ```
182
+
183
+ </details>
184
+
185
+ ## Public Lavalink Services:
186
+
187
+ https://lavalink.milrato.com
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "lavalink-client",
3
+ "version": "1.0.0",
4
+ "description": "Easy to use and advanced Lavalink-Client. Use it with latest lavalink versions and plugins. Inbuilt Filtering and Queue-Management Systems",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/TOmato6966/lavalink-client.git"
12
+ },
13
+ "keywords": [
14
+ "lavalink",
15
+ "client",
16
+ "latest",
17
+ "discord",
18
+ "music"
19
+ ],
20
+ "author": "Tomato6966",
21
+ "license": "MIT",
22
+ "bugs": {
23
+ "url": "https://github.com/TOmato6966/lavalink-client/issues"
24
+ },
25
+ "homepage": "https://github.com/TOmato6966/lavalink-client#readme"
26
+ }