public static IResolver defaultResolver ( ) { return new IResolver ( ) { @ Override public Record [ ] resolve ( Domain domain ) throws IOException { String [ ] addresses = defaultServer ( ) ; if ( addresses == null ) { throw new IOException ( "no dns server" ) ; } IResolver resolver = new Resolver ( InetAddress . getByName ( addresses [ 0 ] ) ) ; return resolver . resolve ( domain ) ; } } ; }
system ip would change