ServerConnectFilter

This commit is contained in:
Anuken
2023-06-03 12:38:18 -04:00
parent 5515cd3187
commit cda82e572f
3 changed files with 9 additions and 1 deletions

View File

@@ -156,6 +156,11 @@ public class ArcNetProvider implements NetProvider{
}); });
} }
@Override
public void setConnectFilter(Server.ServerConnectFilter connectFilter){
server.setConnectFilter(connectFilter);
}
private static boolean isLocal(InetAddress addr){ private static boolean isLocal(InetAddress addr){
if(addr.isAnyLocalAddress() || addr.isLoopbackAddress()) return true; if(addr.isAnyLocalAddress() || addr.isLoopbackAddress()) return true;

View File

@@ -398,5 +398,8 @@ public class Net{
disconnectClient(); disconnectClient();
closeServer(); closeServer();
} }
/** If a connecting ip doesn't match the filter it will be kicked. */
void setConnectFilter(Server.ServerConnectFilter connectFilter);
} }
} }

View File

@@ -25,4 +25,4 @@ org.gradle.caching=true
#used for slow jitpack builds; TODO see if this actually works #used for slow jitpack builds; TODO see if this actually works
org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000 org.gradle.internal.http.connectionTimeout=100000
archash=791c5fa502 archash=10233fcd0f