tls protocol

amin7 days ago

traccar support TLSv1.2", "TLSv1.3" protocol?

Track-trace7 days ago

You can use for instance https://www.traccar.org/secure-connection/ Or Nginx to proxy the connection.

amin7 days ago

can i refactor code like this to support tls? :

  protected void initChannel(Channel channel) throws UnrecoverableEntryException, KeyStoreException, NoSuchAlgorithmException, IOException, CertificateException {
        final ChannelPipeline pipeline = channel.pipeline();

        KeyStore keyStore = KeyStore.getInstance("JKS");
        keyStore.load(new FileInputStream("keystore.jks"), "password".toCharArray());
        KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509");
        keyManagerFactory.init(keyStore, "password".toCharArray());


        // Create the SslContext for TLS
        SslContext sslContext = SslContextBuilder.forServer(keyManagerFactory)
                .clientAuth(ClientAuth.NONE)  // This disables client certificate authentication
                .protocols("TLSv1.2", "TLSv1.3")
                .build();

        // Step 2: Add SslHandler to the pipeline
        SslHandler sslHandler = sslContext.newHandler(channel.alloc());
        pipeline.addFirst(sslHandler);