steam-vent

Crates.iosteam-vent
lib.rssteam-vent
version0.3.1
sourcesrc
created_at2023-08-04 18:48:00.976986
updated_at2024-10-29 18:29:33.262891
descriptionInteract with the Steam network via rust
homepage
repositoryhttps://github.com/icewind1991/steam-vent
max_upload_size
id935562
size204,803
Robin Appelman (icewind1991)

documentation

README

Steam-Vent

Interact with the Steam network via rust

Allows communication with the steam servers using the same protocol as the regular steam client.

State

While the project is still incomplete, the most forms of authenticating to steam are implemented and you can send requests for the protobuf definitions included in the project.

  • Anonymous sessions
  • Password Authentication
  • QR Authentication
  • Steam guard (device or email) confirmation
  • Device notification confirmation
  • Saved machine token confirmation
  • Sending and receiving raw messages
  • Making RPC calls over the connection
  • Communicating with the game coordinator
  • High level wrappers around the RPC calls
  • Allow using messages from protobufs not included in the project

Usage

Note that this project is still in early development and apis might see large changes.

use std::error::Error;
use steam_vent::connection::Connection;
use steam_vent::proto::steammessages_gameservers_steamclient::CGameServers_GetServerList_Request;
use steam_vent::serverlist::ServerList;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let server_list = ServerList::discover().await?;
    let mut connection = Connection::anonymous(server_list).await?;

    let mut req = CGameServers_GetServerList_Request::new();
    req.set_limit(16);
    req.set_filter(r"\appid\440".into());
    let some_tf2_servers = connection.service_method(req).await?;
    for server in some_tf2_servers.servers {
        println!(
            "{}({}) playing {}",
            String::from_utf8_lossy(server.name()),
            server.addr(),
            server.map()
        );
    }

    Ok(())
}

Credit

This is in large parts inspired by and based of @DoctorMcKay's work on SteamUser, massive credits go to all who worked on that.

Commit count: 198

cargo fmt