chore: import verified syly2 maintenance baseline without embedded credentials
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import java.net.*;
|
||||
public class EgressProbe {
|
||||
public static void main(String[] args) throws Exception {
|
||||
String[] hosts = {"db", "10.5.34.202", "1.1.1.1"};
|
||||
int[] ports = {3306, 3306, 443};
|
||||
for (int i=0;i<hosts.length;i++) {
|
||||
boolean connected=false;
|
||||
try (Socket socket=new Socket()) {
|
||||
socket.connect(new InetSocketAddress(hosts[i],ports[i]),1500);
|
||||
connected=true;
|
||||
} catch(Exception expected) {}
|
||||
System.out.println(hosts[i]+":"+ports[i]+"="+(connected?"connected":"blocked"));
|
||||
if ((i==0)!=connected) throw new IllegalStateException("Unexpected UAT network policy");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user