Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support tls sender #7

Merged
merged 1 commit into from
Nov 17, 2024
Merged

feat: support tls sender #7

merged 1 commit into from
Nov 17, 2024

Conversation

tisonkun
Copy link
Contributor

@tisonkun tisonkun commented Nov 17, 2024

This closes #2

use fasyslog::Severity;

fn main() {
let mut sender = fasyslog::sender::tls_well_known("127.0.0.1").unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test locally with:

    let mut sender = fasyslog::sender::tls_with("127.0.0.1:6514", "127.0.0.1", {
        let mut builder = TlsConnector::builder();
        builder.danger_accept_invalid_certs(true);
        builder
    })
    .unwrap();

and vector-rs with syslog source:

sources:
  in:
    type: syslog
    address: 127.0.0.1:6514
    mode: tcp
    path: /path/to/socket
    tls:
      enabled: true
      crt_file: /path/to/certs/identity.p12
      key_file: /path/to/certs/identity.p12
      key_pass: mypass

sinks:
  out:
    inputs:
      - "in"
    type: "console"
    encoding:
      codec: "text"

@tisonkun tisonkun enabled auto-merge (squash) November 17, 2024 07:05
@tisonkun tisonkun merged commit 236ceca into main Nov 17, 2024
9 checks passed
@tisonkun tisonkun deleted the tls branch November 17, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support RFC-5425 TLS Transport Mapping for Syslog
1 participant