mirror of
https://git.zelz.net/catfoolyou/Project164.git
synced 2025-12-14 23:37:40 +00:00
25w16a singleplayer added
This commit is contained in:
36643
stable-download/Offline_Download_Version.html
Normal file
36643
stable-download/Offline_Download_Version.html
Normal file
File diff suppressed because one or more lines are too long
BIN
stable-download/java/bukkit_command/BitchFilterPlugin.jar
Normal file
BIN
stable-download/java/bukkit_command/BitchFilterPlugin.jar
Normal file
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
|
||||
DO NOT IGNORE THIS MESSAGE, USE YOUR BRAIN AND READ!
|
||||
|
||||
Bukkit is a piece of shit, if you "/op LAX1DUDE", a player joining as 'laX1DUDE' or 'LaX1dUdE' or 'lax1dude' will all have /op too
|
||||
|
||||
Either don't use /op and install an actual permissions plugin, or move "BitchFilerPlugin.jar" into this server's "/plugins" folder and use only lowercase letters in your /op profile names!
|
||||
|
||||
Again, if you install the bitchfilter plugin, you need to /op yourself with ALL LOWERCASE LETTERS like "/op lax1dude", and then when you want to join as an op you don't type 'LAX1DUDE' you have to join as 'lax1dude' or you will be kicked by the plugin for security
|
||||
|
||||
PLEASE PLEASE PLEASE DO NOT IGNORE THIS MESSAGE!!!
|
||||
|
||||
IF YOU IGNORE THIS AND USE /op WITH MIXED CASE THEN YOU WILL BE HACKED!!!
|
||||
|
||||
DO NOT MAKE THIS MISTAKE OR YOU CAN LOSE YOUR WHOLE SERVER IN MINUTES!!!
|
||||
3
stable-download/java/bukkit_command/banned-ips.txt
Normal file
3
stable-download/java/bukkit_command/banned-ips.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
# Updated 4/16/25, 3:06 PM by Minecraft 1.6.4
|
||||
# victim name | ban date | banned by | banned until | reason
|
||||
|
||||
3
stable-download/java/bukkit_command/banned-players.txt
Normal file
3
stable-download/java/bukkit_command/banned-players.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
# Updated 4/16/25, 3:06 PM by Minecraft 1.6.4
|
||||
# victim name | ban date | banned by | banned until | reason
|
||||
|
||||
45
stable-download/java/bukkit_command/bukkit.yml
Normal file
45
stable-download/java/bukkit_command/bukkit.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
# This is the main configuration file for Bukkit.
|
||||
# As you can see, there's actually not that much to configure without any plugins.
|
||||
# For a reference for any variable inside this file, check out the bukkit wiki at
|
||||
# http://wiki.bukkit.org/Bukkit.yml
|
||||
settings:
|
||||
allow-end: true
|
||||
warn-on-overload: true
|
||||
permissions-file: permissions.yml
|
||||
update-folder: update
|
||||
ping-packet-limit: 100
|
||||
use-exact-login-location: false
|
||||
plugin-profiling: false
|
||||
connection-throttle: 4000
|
||||
query-plugins: true
|
||||
deprecated-verbose: default
|
||||
shutdown-message: Server closed
|
||||
spawn-limits:
|
||||
monsters: 70
|
||||
animals: 15
|
||||
water-animals: 5
|
||||
ambient: 15
|
||||
chunk-gc:
|
||||
period-in-ticks: 600
|
||||
load-threshold: 0
|
||||
ticks-per:
|
||||
animal-spawns: 400
|
||||
monster-spawns: 1
|
||||
autosave: 0
|
||||
auto-updater:
|
||||
enabled: true
|
||||
on-broken:
|
||||
- warn-console
|
||||
- warn-ops
|
||||
on-update:
|
||||
- warn-console
|
||||
- warn-ops
|
||||
preferred-channel: rb
|
||||
host: dl.bukkit.org
|
||||
suggest-channels: true
|
||||
database:
|
||||
username: bukkit
|
||||
isolation: SERIALIZABLE
|
||||
driver: org.sqlite.JDBC
|
||||
password: walrus
|
||||
url: jdbc:sqlite:{DIR}{NAME}.db
|
||||
BIN
stable-download/java/bukkit_command/craftbukkit-1.6.4-R2.0.jar
Normal file
BIN
stable-download/java/bukkit_command/craftbukkit-1.6.4-R2.0.jar
Normal file
Binary file not shown.
56
stable-download/java/bukkit_command/help.yml
Normal file
56
stable-download/java/bukkit_command/help.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
# This is the help configuration file for Bukkit.
|
||||
#
|
||||
# By default you do not need to modify this file. Help topics for all plugin commands are automatically provided by
|
||||
# or extracted from your installed plugins. You only need to modify this file if you wish to add new help pages to
|
||||
# your server or override the help pages of existing plugin commands.
|
||||
#
|
||||
# This file is divided up into the following parts:
|
||||
# -- general-topics: lists admin defined help topics
|
||||
# -- index-topics: lists admin defined index topics
|
||||
# -- amend-topics: lists topic amendments to apply to existing help topics
|
||||
# -- ignore-plugins: lists any plugins that should be excluded from help
|
||||
#
|
||||
# Examples are given below. When amending command topic, the string <text> will be replaced with the existing value
|
||||
# in the help topic. Color codes can be used in topic text. The color code character is & followed by 0-F.
|
||||
# ================================================================
|
||||
#
|
||||
# Set this to true to list the individual command help topics in the master help.
|
||||
# command-topics-in-master-index: true
|
||||
#
|
||||
# Each general topic will show up as a separate topic in the help index along with all the plugin command topics.
|
||||
# general-topics:
|
||||
# Rules:
|
||||
# shortText: Rules of the server
|
||||
# fullText: |
|
||||
# &61. Be kind to your fellow players.
|
||||
# &B2. No griefing.
|
||||
# &D3. No swearing.
|
||||
# permission: topics.rules
|
||||
#
|
||||
# Each index topic will show up as a separate sub-index in the help index along with all the plugin command topics.
|
||||
# To override the default help index (displayed when the user executes /help), name the index topic "Default".
|
||||
# index-topics:
|
||||
# Ban Commands:
|
||||
# shortText: Player banning commands
|
||||
# preamble: Moderator - do not abuse these commands
|
||||
# permission: op
|
||||
# commands:
|
||||
# - /ban
|
||||
# - /ban-ip
|
||||
# - /banlist
|
||||
#
|
||||
# Topic amendments are used to change the content of automatically generated plugin command topics.
|
||||
# amended-topics:
|
||||
# /stop:
|
||||
# shortText: Stops the server cold....in its tracks!
|
||||
# fullText: <text> - This kills the server.
|
||||
# permission: you.dont.have
|
||||
#
|
||||
# Any plugin in the ignored plugins list will be excluded from help. The name must match the name displayed by
|
||||
# the /plugins command. Ignore "Bukkit" to remove the standard bukkit commands from the index. Ignore "All"
|
||||
# to completely disable automatic help topic generation.
|
||||
# ignore-plugins:
|
||||
# - PluginNameOne
|
||||
# - PluginNameTwo
|
||||
# - PluginNameThree
|
||||
|
||||
0
stable-download/java/bukkit_command/ops.txt
Normal file
0
stable-download/java/bukkit_command/ops.txt
Normal file
0
stable-download/java/bukkit_command/permissions.yml
Normal file
0
stable-download/java/bukkit_command/permissions.yml
Normal file
14
stable-download/java/bukkit_command/readme.txt
Normal file
14
stable-download/java/bukkit_command/readme.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
DO NOT IGNORE THIS MESSAGE, USE YOUR BRAIN AND READ!
|
||||
|
||||
Bukkit is a piece of shit, if you "/op LAX1DUDE", a player joining as 'laX1DUDE' or 'LaX1dUdE' or 'lax1dude' will all have /op too
|
||||
|
||||
Either don't use /op and install an actual permissions plugin, or move "BitchFilerPlugin.jar" into this server's "/plugins" folder and use only lowercase letters in your /op profile names!
|
||||
|
||||
Again, if you install the bitchfilter plugin, you need to /op yourself with ALL LOWERCASE LETTERS like "/op lax1dude", and then when you want to join as an op you don't type 'LAX1DUDE' you have to join as 'lax1dude' or you will be kicked by the plugin for security
|
||||
|
||||
PLEASE PLEASE PLEASE DO NOT IGNORE THIS MESSAGE!!!
|
||||
|
||||
IF YOU IGNORE THIS AND USE /op WITH MIXED CASE THEN YOU WILL BE HACKED!!!
|
||||
|
||||
DO NOT MAKE THIS MISTAKE OR YOU CAN LOSE YOUR WHOLE SERVER IN MINUTES!!!
|
||||
3
stable-download/java/bukkit_command/run.bat
Normal file
3
stable-download/java/bukkit_command/run.bat
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
java -Xmx512M -Xms512M -jar craftbukkit-1.6.4-R2.0.jar
|
||||
pause
|
||||
2
stable-download/java/bukkit_command/run_unix.sh
Normal file
2
stable-download/java/bukkit_command/run_unix.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
java -Xmx512M -Xms512M -jar craftbukkit-1.6.4-R2.0.jar
|
||||
3306
stable-download/java/bukkit_command/server.log
Normal file
3306
stable-download/java/bukkit_command/server.log
Normal file
File diff suppressed because it is too large
Load Diff
31
stable-download/java/bukkit_command/server.properties
Normal file
31
stable-download/java/bukkit_command/server.properties
Normal file
@@ -0,0 +1,31 @@
|
||||
#Minecraft server properties
|
||||
#Wed Apr 16 15:06:52 EDT 2025
|
||||
view-distance=10
|
||||
max-build-height=256
|
||||
server-ip=127.0.0.1
|
||||
level-seed=
|
||||
server-port=25569
|
||||
allow-nether=true
|
||||
gamemode=0
|
||||
enable-rcon=false
|
||||
enable-query=false
|
||||
generator-settings=
|
||||
level-name=world
|
||||
player-idle-timeout=0
|
||||
motd=A Minecraft Server
|
||||
force-gamemode=false
|
||||
hardcore=false
|
||||
white-list=false
|
||||
texture-pack=
|
||||
pvp=true
|
||||
spawn-npcs=true
|
||||
spawn-animals=true
|
||||
generate-structures=true
|
||||
snooper-enabled=true
|
||||
difficulty=1
|
||||
level-type=DEFAULT
|
||||
spawn-monsters=true
|
||||
max-players=20
|
||||
spawn-protection=16
|
||||
online-mode=false
|
||||
allow-flight=false
|
||||
0
stable-download/java/bukkit_command/white-list.txt
Normal file
0
stable-download/java/bukkit_command/white-list.txt
Normal file
5
stable-download/java/bungee_command/README.md
Normal file
5
stable-download/java/bungee_command/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## EaglercraftBungee
|
||||
|
||||
This is regular BungeeCord except it accepts WebSockets instead of raw TCP connections
|
||||
|
||||
**To add an animated MOTD: [https://github.com/LAX1DUDE/eaglercraft-motd/](https://github.com/LAX1DUDE/eaglercraft-motd/)**
|
||||
51
stable-download/java/bungee_command/bans.txt
Normal file
51
stable-download/java/bungee_command/bans.txt
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
#
|
||||
# This file allows you to configure bans for eaglercraftbungee
|
||||
# When it is saved, eaglercraft should reload it automatically
|
||||
# (check the console though to be safe)
|
||||
#
|
||||
# For a [Usernames] ban, just add the player's name. Use a colon ':' to put in a ban reason
|
||||
# For a [IPs] ban, just add the player's IP, or a subnet like 69.69.0.0/16 to ban all IPs beginning with 69.69.*
|
||||
# For a [Wildcards] ban, type a string and prefix and/or suffix it with * to define the wildcard
|
||||
# For a [Regex] ban, type a valid regular expression in the java.util.regex format
|
||||
#
|
||||
# All bans are case-insensitive, USERNAMES ARE CONVERTED TO LOWERCASE BEFORE BEING MATCHED VIA REGEX
|
||||
# Java regex syntax: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
|
||||
#
|
||||
|
||||
# set this to false to use "/eag-ban" to ban on bungee instead of just "/ban"
|
||||
# (most likely needs a restart to take effect)
|
||||
replace-bukkit=false
|
||||
|
||||
|
||||
[Usernames]
|
||||
|
||||
# ban_test1: The ban hammer has spoken!
|
||||
# ban_test2: custom ban message here
|
||||
# ban_test3
|
||||
|
||||
# (remove the '#' before each line to enable)
|
||||
|
||||
[IPs]
|
||||
|
||||
# WARNING: if you're using nginx, banning any player's IP is gonna ban ALL PLAYERS on your server
|
||||
# For this reason, the ban IP command doesn't ban 127.0.0.1 or any other 'private' range IPs
|
||||
|
||||
# 101.202.69.11
|
||||
# 123.21.43.0/24
|
||||
# 2601:1062:69:418:BEEF::10
|
||||
# 2601:6090:420::/48
|
||||
|
||||
[Wildcards]
|
||||
|
||||
# *fuck*
|
||||
# shi*
|
||||
|
||||
|
||||
[Regex]
|
||||
|
||||
# you.+are.(a|the).+bitch
|
||||
|
||||
|
||||
# end of file
|
||||
|
||||
BIN
stable-download/java/bungee_command/bungee-dist.jar
Normal file
BIN
stable-download/java/bungee_command/bungee-dist.jar
Normal file
Binary file not shown.
BIN
stable-download/java/bungee_command/bungee.sqlite
Normal file
BIN
stable-download/java/bungee_command/bungee.sqlite
Normal file
Binary file not shown.
7
stable-download/java/bungee_command/client.log
Normal file
7
stable-download/java/bungee_command/client.log
Normal file
@@ -0,0 +1,7 @@
|
||||
[NetClientHandler] - processReadPackets called
|
||||
[EaglerAdapterImpl2] - Cannot read packet!
|
||||
[WebsocketNetworkManager] - readChunks is empty!
|
||||
[NetClientHandler] - processReadPackets called
|
||||
[EaglerAdapterImpl2] - Cannot read packet!
|
||||
[WebsocketNetworkManager] - readChunks is empty!
|
||||
[EaglerAdapterImpl2] - Writing packet
|
||||
131
stable-download/java/bungee_command/config.yml
Normal file
131
stable-download/java/bungee_command/config.yml
Normal file
@@ -0,0 +1,131 @@
|
||||
origin_blacklist_use_simple_whitelist: false
|
||||
server_name: EaglercraftBungee Server
|
||||
token_verify: ''
|
||||
groups: {}
|
||||
servers:
|
||||
lobby:
|
||||
address: localhost:25569
|
||||
restricted: false
|
||||
voice_turn_servers:
|
||||
openrelay3:
|
||||
password: openrelayproject
|
||||
url: turn:openrelay.metered.ca:443?transport=tcp
|
||||
username: openrelayproject
|
||||
openrelay2:
|
||||
password: openrelayproject
|
||||
url: turn:openrelay.metered.ca:443
|
||||
username: openrelayproject
|
||||
openrelay1:
|
||||
password: openrelayproject
|
||||
url: turn:openrelay.metered.ca:80
|
||||
username: openrelayproject
|
||||
voice_stun_servers:
|
||||
- stun:stun.l.google.com:19302
|
||||
- stun:stun1.l.google.com:19302
|
||||
- stun:stun2.l.google.com:19302
|
||||
- stun:stun3.l.google.com:19302
|
||||
- stun:stun4.l.google.com:19302
|
||||
- stun:openrelay.metered.ca:80
|
||||
enable_web_origin_blacklist: true
|
||||
origin_blacklist_simple_whitelist:
|
||||
- type the name of your client's domain here
|
||||
- (if 'origin_blacklist_use_simple_whitelist' is true)
|
||||
- g.lax1dude.net
|
||||
protocol_support_fix: false
|
||||
origin_blacklist_subscriptions:
|
||||
- https://g.lax1dude.net/eaglercraft/origin_blacklist.txt
|
||||
player_limit: -1
|
||||
origin_blacklist_block_invalid_origin_header: true
|
||||
voice_enabled: true
|
||||
display_ban_type_on_kick: false
|
||||
origin_blacklist_block_offline_download: false
|
||||
accept_bukkit_console_command_packets: false
|
||||
authservice:
|
||||
authfile: auths.db
|
||||
register_enabled: true
|
||||
ip_limit: 0
|
||||
join_messages:
|
||||
- '&3Welcome to my &aEaglercraftBungee &3server!'
|
||||
login_timeout: 30
|
||||
enabled: false
|
||||
disabled_commands: []
|
||||
bungee_on_bungee: false
|
||||
origin_blacklist_block_replit_clients: false
|
||||
stats: 1795b100-6c57-4568-957f-810efbd77cc3
|
||||
listeners:
|
||||
- fallback_server: lobby
|
||||
tab_list: GLOBAL_PING
|
||||
websocket: true
|
||||
texture_size: 16
|
||||
host: 0.0.0.0:25565
|
||||
forced_hosts: {}
|
||||
max_players: 60
|
||||
tab_size: 60
|
||||
default_server: lobby
|
||||
force_default_server: true
|
||||
forward_ip: false
|
||||
server_icon: server-icon.png
|
||||
motd1: '&6An Eaglercraft server'
|
||||
allow_motd: true
|
||||
allow_query: true
|
||||
request_motd_cache:
|
||||
cache_ttl: 7200
|
||||
online_server_list_animation: false
|
||||
online_server_list_results: true
|
||||
online_server_list_trending: true
|
||||
online_server_list_portfolios: false
|
||||
ratelimit:
|
||||
ip:
|
||||
enable: true
|
||||
period: 90
|
||||
limit: 60
|
||||
limit_lockout: 80
|
||||
lockout_duration: 1200
|
||||
exceptions: []
|
||||
login:
|
||||
enable: true
|
||||
period: 50
|
||||
limit: 5
|
||||
limit_lockout: 10
|
||||
lockout_duration: 300
|
||||
exceptions: []
|
||||
motd:
|
||||
enable: true
|
||||
period: 30
|
||||
limit: 5
|
||||
limit_lockout: 15
|
||||
lockout_duration: 300
|
||||
exceptions: []
|
||||
query:
|
||||
enable: true
|
||||
period: 30
|
||||
limit: 15
|
||||
limit_lockout: 25
|
||||
lockout_duration: 900
|
||||
exceptions: []
|
||||
forward_ip_header: X-Real-IP
|
||||
java_host: 'null'
|
||||
permissions:
|
||||
default:
|
||||
- bungeecord.command.server
|
||||
- bungeecord.command.list
|
||||
- bungeecord.command.eag.domain
|
||||
- bungeecord.command.eag.changepassword
|
||||
admin:
|
||||
- bungeecord.command.alert
|
||||
- bungeecord.command.end
|
||||
- bungeecord.command.ip
|
||||
- bungeecord.command.reload
|
||||
- bungeecord.command.eag.ban
|
||||
- bungeecord.command.eag.banwildcard
|
||||
- bungeecord.command.eag.banip
|
||||
- bungeecord.command.eag.banregex
|
||||
- bungeecord.command.eag.reloadban
|
||||
- bungeecord.command.eag.banned
|
||||
- bungeecord.command.eag.banlist
|
||||
- bungeecord.command.eag.unban
|
||||
- bungeecord.command.eag.ratelimit
|
||||
- bungeecord.command.eag.blockdomain
|
||||
- bungeecord.command.eag.blockdomainname
|
||||
- bungeecord.command.eag.unblockdomain
|
||||
timeout: 30000
|
||||
3
stable-download/java/bungee_command/origin_blacklist.txt
Normal file
3
stable-download/java/bungee_command/origin_blacklist.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
#whitelistMode: false
|
||||
|
||||
|
||||
85382
stable-download/java/bungee_command/proxy.log.0
Normal file
85382
stable-download/java/bungee_command/proxy.log.0
Normal file
File diff suppressed because it is too large
Load Diff
0
stable-download/java/bungee_command/proxy.log.0.lck
Normal file
0
stable-download/java/bungee_command/proxy.log.0.lck
Normal file
3
stable-download/java/bungee_command/run.bat
Normal file
3
stable-download/java/bungee_command/run.bat
Normal file
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
java -Xmx32M -Xms32M -jar bungee-dist.jar
|
||||
pause
|
||||
2
stable-download/java/bungee_command/run_unix.sh
Normal file
2
stable-download/java/bungee_command/run_unix.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
java -Xmx32M -Xms32M -jar bungee-dist.jar
|
||||
BIN
stable-download/java/bungee_command/server-icon.png
Normal file
BIN
stable-download/java/bungee_command/server-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
stable-download/stable-download.zip
Normal file
BIN
stable-download/stable-download.zip
Normal file
Binary file not shown.
BIN
stable-download/web/assets.epk
Normal file
BIN
stable-download/web/assets.epk
Normal file
Binary file not shown.
17922
stable-download/web/classes.js
Normal file
17922
stable-download/web/classes.js
Normal file
File diff suppressed because it is too large
Load Diff
1
stable-download/web/classes.js.map
Normal file
1
stable-download/web/classes.js.map
Normal file
File diff suppressed because one or more lines are too long
18532
stable-download/web/classes_server.js
Normal file
18532
stable-download/web/classes_server.js
Normal file
File diff suppressed because it is too large
Load Diff
1
stable-download/web/classes_server.js.map
Normal file
1
stable-download/web/classes_server.js.map
Normal file
File diff suppressed because one or more lines are too long
26
stable-download/web/eagswebrtc.js
Normal file
26
stable-download/web/eagswebrtc.js
Normal file
@@ -0,0 +1,26 @@
|
||||
window.initializeVoiceClient=()=>{class k{constructor(a,b,c,e){this.client=a;this.peerId=b;this.peerConnection=c;this.stream=null;this.peerConnection.addEventListener("icecandidate",f=>{f.candidate&&this.client.iceCandidateHandler(this.peerId,JSON.stringify({sdpMLineIndex:f.candidate.sdpMLineIndex,candidate:f.candidate.candidate}))});this.peerConnection.addEventListener("track",f=>{this.rawStream=f.streams[0];const g=new Audio;g.autoplay=!0;g.muted=!0;g.onended=function(){g.remove()};g.srcObject=
|
||||
this.rawStream;this.client.peerTrackHandler(this.peerId,this.rawStream)});this.peerConnection.addStream(this.client.localMediaStream.stream);e&&this.peerConnection.createOffer(f=>{this.peerConnection.setLocalDescription(f,()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(f))},g=>{console.error('Failed to set local description for "'+this.peerId+'"! '+g);this.client.signalDisconnect(this.peerId)})},f=>{console.error('Failed to set create offer for "'+this.peerId+'"! '+f);this.client.signalDisconnect(this.peerId)});
|
||||
this.peerConnection.addEventListener("connectionstatechange",f=>{"disconnected"!==this.peerConnection.connectionState&&"failed"!==this.peerConnection.connectionState||this.client.signalDisconnect(this.peerId)})}disconnect(){this.peerConnection.close()}mute(a){this.rawStream.getAudioTracks()[0].enabled=!a}setRemoteDescription(a){try{const b=JSON.parse(a);this.peerConnection.setRemoteDescription(b,()=>{"offer"===b.type&&this.peerConnection.createAnswer(c=>{this.peerConnection.setLocalDescription(c,
|
||||
()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(c))},e=>{console.error('Failed to set local description for "'+this.peerId+'"! '+e);this.client.signalDisconnect(this.peerId)})},c=>{console.error('Failed to create answer for "'+this.peerId+'"! '+c);this.client.signalDisconnect(this.peerId)})},c=>{console.error('Failed to set remote description for "'+this.peerId+'"! '+c);this.client.signalDisconnect(this.peerId)})}catch(b){console.error('Failed to parse remote description for "'+this.peerId+
|
||||
'"! '+b),this.client.signalDisconnect(this.peerId)}}addICECandidate(a){try{this.peerConnection.addIceCandidate(new RTCIceCandidate(JSON.parse(a)))}catch(b){console.error('Failed to parse ice candidate for "'+this.peerId+'"! '+b),this.client.signalDisconnect(this.peerId)}}}class d{constructor(){this.ICEServers=[];this.hasInit=!1;this.peerList=new Map;this.readyState=0;this.microphoneVolumeAudioContext=this.peerDisconnectHandler=this.peerTrackHandler=this.descriptionHandler=this.iceCandidateHandler=
|
||||
null}voiceClientSupported(){return"undefined"!==typeof window.RTCPeerConnection&&"undefined"!==typeof navigator.mediaDevices&&"undefined"!==typeof navigator.mediaDevices.getUserMedia}setICEServers(a){for(var b=this.ICEServers.length=0;b<a.length;++b){var c=a[b].split(";");1===c.length?this.ICEServers.push({urls:c[0]}):3===c.length&&this.ICEServers.push({urls:c[0],username:c[1],credential:c[2]})}}setICECandidateHandler(a){this.iceCandidateHandler=a}setDescriptionHandler(a){this.descriptionHandler=
|
||||
a}setPeerTrackHandler(a){this.peerTrackHandler=a}setPeerDisconnectHandler(a){this.peerDisconnectHandler=a}activateVoice(a){this.hasInit&&(this.localRawMediaStream.getAudioTracks()[0].enabled=a)}initializeDevices(){this.hasInit?this.readyState=1:navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(a=>{this.microphoneVolumeAudioContext=new AudioContext;this.localRawMediaStream=a;this.localRawMediaStream.getAudioTracks()[0].enabled=!1;this.localMediaStream=this.microphoneVolumeAudioContext.createMediaStreamDestination();
|
||||
this.localMediaStreamGain=this.microphoneVolumeAudioContext.createGain();this.microphoneVolumeAudioContext.createMediaStreamSource(a).connect(this.localMediaStreamGain);this.localMediaStreamGain.connect(this.localMediaStream);this.readyState=this.localMediaStreamGain.gain.value=1;this.hasInit=!0}).catch(a=>{this.readyState=-1})}setMicVolume(a){this.hasInit&&(.5<a&&(a=.5+2*(a-.5)),1.5<a&&(a=1.5),0>a&&(a=0),this.localMediaStreamGain.gain.value=2*a)}getReadyState(){return this.readyState}signalConnect(a,
|
||||
b){try{const c=new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),e=new k(this,a,c,b);this.peerList.set(a,e)}catch(c){}}signalDescription(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.setRemoteDescription(b)}signalDisconnect(a,b){var c=this.peerList.get(a);if("undefined"!==typeof c&&null!==c){this.peerList.delete(c);try{c.disconnect()}catch(e){}this.peerDisconnectHandler(a,b)}}mutePeer(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==
|
||||
a&&a.mute(b)}signalICECandidate(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.addICECandidate(b)}}window.constructVoiceClient=()=>new d};window.startVoiceClient=()=>{"function"!==typeof window.constructVoiceClient&&window.initializeVoiceClient();return window.constructVoiceClient()};
|
||||
window.initializeLANClient=()=>{class k{constructor(){this.ICEServers=[];this.dataChannel=this.peerConnection=null;this.readyState=1;this.remotePacketHandler=this.remoteDisconnectHandler=this.remoteDataChannelHandler=this.descriptionHandler=this.iceCandidateHandler=null}LANClientSupported(){return"undefined"!==typeof window.RTCPeerConnection}initializeClient(){try{null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null),null!==this.peerConnection&&this.peerConnection.close(),this.peerConnection=
|
||||
new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),this.readyState=1}catch(d){this.readyState=-2}}setICEServers(d){for(var a=this.ICEServers.length=0;a<d.length;++a){var b=d[a].split(";");1===b.length?this.ICEServers.push({urls:b[0]}):3===b.length&&this.ICEServers.push({urls:b[0],username:b[1],credential:b[2]})}}setICECandidateHandler(d){this.iceCandidateHandler=d}setDescriptionHandler(d){this.descriptionHandler=d}setRemoteDataChannelHandler(d){this.remoteDataChannelHandler=
|
||||
d}setRemoteDisconnectHandler(d){this.remoteDisconnectHandler=d}setRemotePacketHandler(d){this.remotePacketHandler=d}getReadyState(){return this.readyState}sendPacketToServer(d){null!==this.dataChannel&&"open"===this.dataChannel.readyState?this.dataChannel.send(d):this.signalRemoteDisconnect(!1)}signalRemoteConnect(){const d=[];this.peerConnection.addEventListener("icecandidate",a=>{if(a.candidate){if(0===d.length){let b=[0,0],c;setTimeout(c=()=>{if(null!==this.peerConnection&&"disconnected"!==this.peerConnection.connectionState){const e=
|
||||
++b[1];b[0]!==d.length&&3>e?(b[0]=d.length,setTimeout(c,2E3)):(this.iceCandidateHandler(JSON.stringify(d)),d.length=0)}},2E3)}d.push({sdpMLineIndex:a.candidate.sdpMLineIndex,candidate:a.candidate.candidate})}});this.dataChannel=this.peerConnection.createDataChannel("lan");this.dataChannel.binaryType="arraybuffer";this.dataChannel.addEventListener("open",async a=>{for(;0<d.length;)await new Promise(b=>setTimeout(b,10));this.remoteDataChannelHandler(this.dataChannel)});this.dataChannel.addEventListener("message",
|
||||
a=>{this.remotePacketHandler(a.data)},!1);this.peerConnection.createOffer(a=>{this.peerConnection.setLocalDescription(a,()=>{this.descriptionHandler(JSON.stringify(a))},b=>{console.error("Failed to set local description! "+b);this.readyState=-1;this.signalRemoteDisconnect(!1)})},a=>{console.error("Failed to set create offer! "+a);this.readyState=-1;this.signalRemoteDisconnect(!1)});this.peerConnection.addEventListener("connectionstatechange",a=>{"disconnected"===this.peerConnection.connectionState?
|
||||
this.signalRemoteDisconnect(!1):"connected"===this.peerConnection.connectionState?this.readyState=2:"failed"===this.peerConnection.connectionState&&(this.readyState=-1,this.signalRemoteDisconnect(!1))})}signalRemoteDescription(d){try{this.peerConnection.setRemoteDescription(JSON.parse(d))}catch(a){console.error(a),this.readyState=-1,this.signalRemoteDisconnect(!1)}}signalRemoteICECandidate(d){try{const a=JSON.parse(d);for(let b of a)this.peerConnection.addIceCandidate(b)}catch(a){console.error(a),
|
||||
this.readyState=-1,this.signalRemoteDisconnect(!1)}}signalRemoteDisconnect(d){null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null);null!==this.peerConnection&&this.peerConnection.close();d||this.remoteDisconnectHandler();this.readyState=0}}window.constructLANClient=()=>new k};window.startLANClient=()=>{"function"!==typeof window.constructLANClient&&window.initializeLANClient();return window.constructLANClient()};
|
||||
window.initializeLANServer=()=>{class k{constructor(a,b,c){this.client=a;this.peerId=b;this.peerConnection=c;this.dataChannel=null;const e=[];let f=!1;this.peerConnection.addEventListener("icecandidate",g=>{if(g.candidate){if(0===e.length){let h=[0,0],l;setTimeout(l=()=>{if(null!==this.peerConnection&&"disconnected"!==this.peerConnection.connectionState){const m=++h[1];h[0]!==e.length&&3>m?(h[0]=e.length,setTimeout(l,2E3)):(this.client.iceCandidateHandler(this.peerId,JSON.stringify(e)),e.length=0,
|
||||
f=!0)}},2E3)}e.push({sdpMLineIndex:g.candidate.sdpMLineIndex,candidate:g.candidate.candidate})}});this.peerConnection.addEventListener("datachannel",async g=>{for(;!f;)await new Promise(h=>setTimeout(h,10));this.dataChannel=g.channel;this.client.remoteClientDataChannelHandler(this.peerId,this.dataChannel);this.dataChannel.addEventListener("message",h=>{this.client.remoteClientPacketHandler(this.peerId,h.data)},!1)},!1);this.peerConnection.addEventListener("connectionstatechange",g=>{"disconnected"!==
|
||||
this.peerConnection.connectionState&&"failed"!==this.peerConnection.connectionState||this.client.signalRemoteDisconnect(this.peerId)})}disconnect(){null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null);this.peerConnection.close()}setRemoteDescription(a){try{const b=JSON.parse(a);this.peerConnection.setRemoteDescription(b,()=>{"offer"===b.type&&this.peerConnection.createAnswer(c=>{this.peerConnection.setLocalDescription(c,()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(c))},
|
||||
e=>{console.error('Failed to set local description for "'+this.peerId+'"! '+e);this.client.signalRemoteDisconnect(this.peerId)})},c=>{console.error('Failed to create answer for "'+this.peerId+'"! '+c);this.client.signalRemoteDisconnect(this.peerId)})},c=>{console.error('Failed to set remote description for "'+this.peerId+'"! '+c);this.client.signalRemoteDisconnect(this.peerId)})}catch(b){console.error('Failed to parse remote description for "'+this.peerId+'"! '+b),this.client.signalRemoteDisconnect(this.peerId)}}addICECandidate(a){try{const b=
|
||||
JSON.parse(a);for(let c of b)this.peerConnection.addIceCandidate(new RTCIceCandidate(c))}catch(b){console.error('Failed to parse ice candidate for "'+this.peerId+'"! '+b),this.client.signalRemoteDisconnect(this.peerId)}}}class d{constructor(){this.ICEServers=[];this.hasInit=!1;this.peerList=new Map;this.remoteClientPacketHandler=this.remoteClientDisconnectHandler=this.remoteClientDataChannelHandler=this.descriptionHandler=this.iceCandidateHandler=null}LANServerSupported(){return"undefined"!==typeof window.RTCPeerConnection}initializeServer(){}setICEServers(a){for(var b=
|
||||
this.ICEServers.length=0;b<a.length;++b){var c=a[b].split(";");1===c.length?this.ICEServers.push({urls:c[0]}):3===c.length&&this.ICEServers.push({urls:c[0],username:c[1],credential:c[2]})}}setICECandidateHandler(a){this.iceCandidateHandler=a}setDescriptionHandler(a){this.descriptionHandler=a}setRemoteClientDataChannelHandler(a){this.remoteClientDataChannelHandler=a}setRemoteClientDisconnectHandler(a){this.remoteClientDisconnectHandler=a}setRemoteClientPacketHandler(a){this.remoteClientPacketHandler=
|
||||
a}sendPacketToRemoteClient(a,b){var c=this.peerList.get(a);"undefined"!==typeof c&&null!==c&&(null!=c.dataChannel&&"open"===c.dataChannel.readyState?c.dataChannel.send(b):this.signalRemoteDisconnect(a))}signalRemoteConnect(a){try{const b=new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),c=new k(this,a,b);this.peerList.set(a,c)}catch(b){}}signalRemoteDescription(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.setRemoteDescription(b)}signalRemoteICECandidate(a,
|
||||
b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.addICECandidate(b)}signalRemoteDisconnect(a){if(0===a.length){for(var b of this.peerList.values())if("undefined"!==typeof b&&null!==b){this.peerList.delete(a);try{b.disconnect()}catch(c){}this.remoteClientDisconnectHandler(a)}this.peerList.clear()}else if(b=this.peerList.get(a),"undefined"!==typeof b&&null!==b){this.peerList.delete(a);try{b.disconnect()}catch(c){}this.remoteClientDisconnectHandler(a)}}countPeers(){return this.peerList.size}}
|
||||
window.constructLANServer=()=>new d};window.startLANServer=()=>{"function"!==typeof window.constructLANServer&&window.initializeLANServer();return window.constructLANServer()};
|
||||
5
stable-download/web/worker_bootstrap.js
Normal file
5
stable-download/web/worker_bootstrap.js
Normal file
@@ -0,0 +1,5 @@
|
||||
onmessage = function(o) {
|
||||
importScripts("classes_server.js");
|
||||
eaglercraftServerOpts = o.data;
|
||||
main();
|
||||
};
|
||||
Reference in New Issue
Block a user