-
-
Notifications
You must be signed in to change notification settings - Fork 28
6 lavalink tutorial
- Lavalink is an open-source Discord Queue Manager and Audioplayer, as well as scraper.
- First download the Lavalink executeable File: from the releases page
wget https://github.com/freyacodes/Lavalink/releases/download/3.7.5/Lavalink.jar
- Then download my example configuration File application.yml | Example application.yml from official repo - LINK
wget https://raw.githubusercontent.com/Tomato6966/Debian-Cheat-Sheet-Setup/main/application.yml
Make sure the file-name is equal to: application.yml
NOTE: If you don't wanna use the spotify plugin, then remove it from MY EXAMPLE application.yml
other wise you'd get errors. as far this is just a note-cheatsheet FOR ME
- Then download all the available Plugins: List & Infos and put them in ./plugins
mkdir plugins && cd plugins
# adds additional source managers that are not widely used
wget https://github.com/DuncteBot/skybot-lavalink-plugin/releases/download/1.3.3/skybot-lavalink-plugin-1.3.3.jar
# adds spotify (api) and apple music search support
wget https://github.com/Topis-Lavalink-Plugins/Topis-Source-Managers-Plugin/releases/download/v2.0.6/topis-source-managers-plugin-2.0.6.jar
Now everything should look like this:
make sure to edit:
- port to access Lavalink from a different Port
- password so that you have a password
- spotify -> clientId & clientSecret get them from here
- All other values to fit your needs
in the folder of Lavalink.jar
and application.yml
execute the following
java -jar Lavalink.jar
- pm2:
npm i -g pm2; # add pm2 to the system
pm2 start --name Lavalink --max-memory-restart 4G java -- -jar Lavalink.jar
- screen: screen -t Lavalink -s Lavalink java -jar Lavalink # in the screen window:
you need the following information:
- host:
localhost
|127.0.0.1
|IPV4 Address
(if the port is open) - port:
2333
|defined_port
- password:
youshallnotpass
|defined_port
And then connect with a client-wrapper list
for nodejs I recommend erela.js fork by me
Start using ipv6 routating, to prevent an ip ban from youtube! check here for more infos
First enable allowments for ipv6
# Enable now
sysctl -w net.ipv6.ip_nonlocal_bind=1
# Persist for next boot
echo 'net.ipv6.ip_nonlocal_bind=1' >> /etc/sysctl.conf
More ipv6 Settings for your sysctl.conf file which are recommended:
sysctl -w net.ipv6.conf.all.autoconf=0
sysctl -w net.ipv6.conf.all.accept_ra=0
echo 'net.ipv6.conf.all.autoconf=0' >> /etc/sysctl.conf
echo 'net.ipv6.conf.all.accept_ra=0' >> /etc/sysctl.conf
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.
ip -6 route replace local 1234:1234:1234::/64 dev lo
Don't know how to route it with netplan / interfaces? Ask your provider or do:
ip add add local 1234:1234:1234::/64 dev lo
Test the config
# Test that IPv6 works in the first place
ping6 google.com
# If you have the IPv6 block 1234:1234:1234::/48
# You should be able to use any of the IPs within that block
ping6 -I 1234:1234:1234:: -c 2 google.com
ping6 -I 1234:1234:1234::1 -c 2 google.com
ping6 -I 1234:1234:1234::2 -c 2 google.com
ping6 -I 1234:1234:1234:dead:beef:1234:1234 -c 2 google.com
IF you get could not assign requested address, then it's not routed to your system..
IF YOU GET 100% PACKET LOSS THEN EVERYTHING IS OKAY DO THE FOLLOWING:
# Install routing proxy
sudo apt-get -y install ndppd
# Create / edit it's config file
nano /etc/ndppd.conf
# Next paste the following: again replace the block with your block
route-ttl 30000
proxy enp1s0 { # your interface name
router no # If it should send router bit | default: yes
timeout 500 # How long (in ms) it waits to assign a request address (lower == faster but more unstable) | default: 500
ttl 30000 # How long (in ms) it caches an Ip Address (for lavalink you can def. set this one to 3600000 | default: 30000
rule 1234:1234:1234::/64{
static # to respond immediatelly
}
}
Before saving replace enp1s0
with your interface block name
It's findable with: ip addr there are multiple, just find the name of the one where your ipv6 Block is in!
NOW START ndppd
ndppd -d -c /etc/ndppd.conf
# Restart: systemctl restart ndppd
# Stop: systemctl stop ndppd
# Status : systemctl status ndppd
# Start: systemctl start ndppd
If apt-install fails do this:
wget http://data.vshell.net/files/ndppd-0.2.5.tar.gz
tar -zxvf ndppd-0.2.5.tar.gz
cd ndppd-0.2.5
make
make install
How does my /etc/ndppd.conf look like?
route-ttl 3600000
proxy enp1s0 {
router yes
timeout 50
ttl 3600000
rule 2423:2220:123:1234::/64{
static
}
}
If you'd like to do all that within a script, simply copy the following code into a setupIpv6.sh
file (make sure to do chmod +rwx setupIpv6.sh
):
#!/bin/bash
read -p "enter the ipv6 Block with suffix (e.g. 1234:204:7cde::/48 / 1234:204:7cde:1234::/64): " ipBlock
echo "sysctl -w net.ipv6.ip_nonlocal_bind=1"
sysctl -w net.ipv6.ip_nonlocal_bind=1
echo "sysctl -w net.ipv6.conf.all.autoconf=0"
sysctl -w net.ipv6.conf.all.autoconf=0
echo "sysctl -w net.ipv6.conf.all.accept_ra=0"
sysctl -w net.ipv6.conf.all.accept_ra=0
echo "ip add add local $ipBlock dev lo"
ip add add local $ipBlock dev lo
echo "ip -6 route replace local $ipBlock dev lo"
ip -6 route replace local $ipBlock dev lo
read -p "ipv6 configuration commands executed, wanna test it? (y / n): " yn
case $yn in
[yY] ) echo "now testing the ipv6";
break;;
[nN] )
exit;;
* ) echo invalid response;
exit 1;;
esac
# define blocks
ipBlockUse=${ipBlock::-3}
ipBlockUse2="${ipBlock::-3}1234:1234"
ipBlockUse3="${ipBlock::-3}dead:beef"
ipBlockUse4="${ipBlock::-3}deaf:1234:beef"
# loop over the blocks
for i in $ipBlockUse $ipBlockUse2 $ipBlockUse3 $ipBlockUse4
do
echo "Now testing the Ipv6 / Block: $i"
ping6 -I $i -c 2 google.com
done
echo "done testing"
-
1 All needed Console Commands
- 1.1 Directory Navigation
- 1.2 System Information
- 1.3 Hardware Information
- 1.4 File and Directory Cmds
- 1.5 Process Management
- 1.6 File Permissions
- 1.7 Networking
- 1.8 Archives (Tar Files)
- 1.9 Search
- 1.10 File Transfers
- 1.11 Disk Usage
- 1.12 User Information and Management
- 1.13 Speedtest
- 1.14 Clear Cache
- 1.15 Disable Sleeping Processes (Suspending)
- 1.16 Remove Welcome Message