Skip to content

Commit

Permalink
WebSockets support in http(s) shares.
Browse files Browse the repository at this point in the history
  • Loading branch information
aalku committed Dec 9, 2023
1 parent ba4a90c commit b471b0c
Show file tree
Hide file tree
Showing 7 changed files with 394 additions and 10 deletions.
12 changes: 10 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.2</version>
<version>3.1.6</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>org.aalku.joatse</groupId>
<artifactId>joatse-cloud</artifactId>
<version>0.0.20-SNAPSHOT</version>
<version>0.0.21-SNAPSHOT</version>
<name>joatse-cloud</name>
<description>Tunnel Router</description>
<properties>
Expand Down Expand Up @@ -118,6 +118,14 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-jetty-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-jetty-client</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ SecurityFilterChain filterChain(HttpSecurity http, JWTAuthorizationFilter jwtAut
.addFilterBefore(jwtAuthorizationFilter, UsernamePasswordAuthenticationFilter.class)
.authorizeHttpRequests(t -> t.requestMatchers(WebSocketConfig.CONNECTION_HTTP_PATH).anonymous()
//
.requestMatchers(HttpMethod.GET, "/ws-test.html").permitAll()
.requestMatchers(HttpMethod.GET, "/login.html", "/css/**", "/header.js", "/lib/*.js").permitAll()
.requestMatchers(HttpMethod.GET, "/user").permitAll()
.requestMatchers("/error").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,4 +416,9 @@ public HttpTunnel getTunnelForHttpRequest(InetAddress remoteAddress, int serverP
return null;
}
}

public HttpTunnel getHttpTunnelById(UUID uuid, long httpTunnelId) {
HttpTunnel res = tunnelRegistry.getHttpTunnel(uuid, httpTunnelId);
return res;
}
}
Loading

0 comments on commit b471b0c

Please sign in to comment.