Skip to content

Commit e8e3cd4

Browse files
committed
add proxy info
1 parent 5897b1d commit e8e3cd4

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,60 @@ services:
267267
```
268268
269269
Next, start everything with `docker-compose up` and watch the following video to [configure Keycloak manually](https://vimeo.com/458246315).
270+
271+
## Working Behind a Corporate Proxy
272+
273+
If you're working behind a corporate proxy, you may need to configure proxy settings for Maven, npm, and the AWS SDK to ensure proper connectivity.
274+
275+
### Maven Proxy Configuration
276+
277+
Add the following to your `~/.m2/settings.xml` file (create it if it doesn't exist):
278+
279+
```xml
280+
<settings>
281+
<proxies>
282+
<proxy>
283+
<id>corporate-proxy-https</id>
284+
<active>true</active>
285+
<protocol>https</protocol>
286+
<host>your-proxy-host.company.com</host>
287+
<port>8080</port>
288+
<username>your-username</username> <!-- Optional -->
289+
<password>your-password</password> <!-- Optional -->
290+
<nonProxyHosts>localhost|127.0.0.1|*.local</nonProxyHosts>
291+
</proxy>
292+
</proxies>
293+
</settings>
294+
```
295+
296+
### npm Proxy Configuration
297+
298+
Configure npm to use your corporate proxy:
299+
300+
```bash
301+
npm config set proxy http://your-proxy-host.company.com:8080
302+
npm config set https-proxy http://your-proxy-host.company.com:8080
303+
304+
# If authentication is required
305+
npm config set proxy http://username:password@your-proxy-host.company.com:8080
306+
npm config set https-proxy http://username:password@your-proxy-host.company.com:8080
307+
308+
# Verify configuration
309+
npm config get proxy
310+
npm config get https-proxy
311+
```
312+
313+
### AWS SDK Proxy Configuration (LocalStack Connection)
314+
315+
When running the application, the AWS SDK may attempt to route localhost connections (to LocalStack) through your corporate proxy, which will fail. To prevent this, add the following JVM argument when starting the application:
316+
317+
```bash
318+
# Using Maven
319+
./mvnw spring-boot:run -Dspring-boot.run.jvmArguments="-Dhttp.nonProxyHosts='localhost|127.0.0.1|::1|*.local'"
320+
321+
# Using java -jar
322+
java -Dhttp.nonProxyHosts="localhost|127.0.0.1|::1|*.local" -jar target/application.jar
323+
324+
# In IntelliJ IDEA: Run > Edit Configurations > VM options
325+
-Dhttp.nonProxyHosts="localhost|127.0.0.1|::1|*.local"
326+
```

0 commit comments

Comments
 (0)