I need to check what accounts from my huge list are still valid on VPN-server, but I haven’t found any information on how to do it with Java language. How do I connect to PPTP-server using Java?
I created a socket with the server ip and PPTP-port, just like this, according to PPTP working over TCP:
Socket pptpSocket = new Socket("51.15.151.165", 1723); PrintWriter out = new PrintWriter(pptpSocket.getOutputStream(), true); BufferedReader in = new BufferedReader(new InputStreamReader(pptpSocket.getInputStream())); System.out.println(in.readLine());
Related Posts:
- What’s causing my java.net.SocketException: Connection reset?
- java.net.SocketException: Network is unreachable: connect
- java.net.SocketException: Software caused connection abort: recv failed
- What does “connection reset by peer” mean?
- What is AF_INET, and why do I need it?
- C++ network programming
- Python [Errno 98] Address already in use
- Will setting a multicast destination address to FFFF.FFFF.FFFF make it a broadcast?
- How to fix java.net.SocketException: Broken pipe?
- Android – could not install *smartsocket* listener
- java.net.SocketTimeoutException: Read timed out under Tomcat
- How to solve javax.net.ssl.SSLHandshakeException Error?
- Python ConnectionRefusedError: [Errno 61] Connection refused
- java.net.SocketException: Connection reset
- Cannot assign requested address using ServerSocket.socketBind
- Why is my method undefined for the type object?
- Exception in thread “main” java.net.ConnectException: Connection refused: connect Socket Programming Java
- Java simple code: java.net.SocketException: Unexpected end of file from server
- Getting the IP address of the current machine using Java
- Official reasons for “Software caused connection abort: socket write error”
- What is the meaning of “sin_addr.s_addr ” and “inet_addr”?
- Could not reserve enough space for object heap
- Possible causes of Java VM EXCEPTION_ACCESS_VIOLATION?
- java.lang.ClassNotFoundException: com.mysql.jdbc.Driver in Eclipse
- “Char cannot be dereferenced” error
- java.net.ConnectException: Connection refused
- What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it?
- Exception in thread “main” java.lang.Error: Unresolved compilation problems
- How do I debug error ECONNRESET in Node.js?
- Difference between Inheritance and Composition
- Unsupported major.minor version 52.0 [duplicate]
- What is a StringIndexOutOfBoundsException? How can I fix it?
- Exception in Application start method java.lang.reflect.InvocationTargetException
- Non-static variable cannot be referenced from a static context
- How to get an enum value from a string value in Java
- Round a double to 2 decimal places [duplicate]
- Connect: Socket operation on non-socket
- Int division: Why is the result of 1/3 == 0?
- Given final block not properly padded
- What is Parse/parsing?
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘MyController’:
- Can I multiply strings in Java to repeat sequences?
- Why does cache use Most Recently Used (MRU) algorithm as evict policy?
- Difference between HashMap and Map in Java..?
- javac not working in windows command prompt
- Java returns error “Cannot instantiate the type”
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
- Program received signal SIGPIPE, Broken pipe
- How does a Breadth-First Search work when looking for Shortest Path?
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Is there a concurrent List in Java’s JDK?
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Why am I still getting a cannot find Java SE Runtime Environment?
- How can I play sound in Java?
- IntelliJ: Error:java: error: release version 5 not supported
- error: unreported exception FileNotFoundException; must be caught or declared to be thrown
- implicit super constructor Person() is undefined. Must explicitly invoke another constructor?
- How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?
- Double cannot be dereferenced?
- Encrypt Password in Configuration Files?
- mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists
- Python socket.error: [Errno 111] Connection refused
- Missing method body, or declare abstract in Java
- java code is showing error. ( ‘;’,expected) [closed]
- Java, Simplified check if int array contains int
- Converting a string to an integer on Android
- Error: Generic Array Creation
- How to center the text in a JLabel?
- What is the use of a private static variable in Java?
- Call a Class From another class
- Installing WindowBuilder on Eclipse Neon
- Java: Error creating a GZIPInputStream: Not in GZIP format
- Java: how to initialize String[]?
- Regular Expressions on Punctuation
- Error: class X is public should be declared in a file named X.java
- How can I remove a substring from a given String?
- Java get String CompareTo as a comparator object
- What does super.paintComponent(g) do?
- Union or intersection of Java Sets
- Get an OutputStream into a String
- Difference between string object and string literal
- Best way to create enum of strings?
- Why use getters and setters/accessors?
- Getting a “no interface expected here” when I try to subclass ServiceConnection [duplicate]
- How to determine day of week by passing specific date?
- Python-like list comprehension in Java
- Can an int be null in Java?
- What’s the difference between HashSet and Set?
- Netbeans – Error: Could not find or load main class
- Eclipse IDE – Error: Build path specifies execution environment Java SE 1.7
- Why int[] a = new int[1] instead of just int a?
- ArithmeticException: “Non-terminating decimal expansion; no exact representable decimal result”
- What’s the console.log() of java?
- When to use a Map instead of a List in Java?
- How do I replace a character in a string in Java?
- What’s so special about 0x7f?
- set background color: Android
- Class JavaLaunchHelper is implemented in two places
- What’s the equivalent of Java’s Thread.sleep() in JavaScript?
- No Main class found in NetBeans