Using cpolar for Intranet Penetration to Debug SpringBoot APIs
This tutorial explains how to set up a Java SpringBoot service, install and configure the cpolar intranet‑penetration tool, create HTTP tunnels for local ports, test the public endpoints with Postman, reserve a fixed sub‑domain, and use cpolar's listener for request debugging.
1. Local Environment Setup
Install JDK 1.8, IDEA, SpringBoot, Maven, Tomcat 9.0 and Postman.
2. Build SpringBoot Service
Create a SpringBoot project and implement a POST interface for demonstration.
2. Intranet Penetration with cpolar
Download and install cpolar, register an account, and log in via the client.
2.1 Install and configure cpolar
Visit https://www.cpolar.com/ , download the client for Windows or Linux and follow the official guide.
2.2 Create tunnel mapping local port
After installation, open http://localhost:9200 in a browser, log in, then create an HTTP tunnel for the local Tomcat 8080 port, specifying tunnel name, protocol, local address, domain type (random), and region.
Copy the generated public address.
2.3 Test public address
Use Postman to send a POST request to the public address plus the API path, with JSON parameters, and verify the request reaches the service.
3. Fixed Public Address
Reserve a sub‑domain in cpolar (requires at least the basic plan), configure the tunnel to use the reserved sub‑domain, and update the tunnel settings.
Test the fixed address with Postman to ensure successful calls.
4. cpolar Listener
Enable the listener feature (http://localhost:4040) in the tunnel’s advanced settings to view request logs, replay requests, and debug more efficiently.
Top Architect
Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.