pub struct ProxyBuilder { /* private fields */ }Expand description
Configuration for a reflection proxy. Build with
ReflectionProxy::builder.
Implementations§
Source§impl ProxyBuilder
impl ProxyBuilder
Sourcepub fn bind(self, addr: impl Into<String>) -> Self
pub fn bind(self, addr: impl Into<String>) -> Self
Local address the proxy listens on (default 127.0.0.1:25566;
use port 0 for an OS-assigned free port).
Sourcepub fn target(self, host: impl Into<String>) -> Self
pub fn target(self, host: impl Into<String>) -> Self
The real server, e.g. "mc.hypixel.net" or "host:port".
Sourcepub fn email(self, email: impl Into<String>) -> Self
pub fn email(self, email: impl Into<String>) -> Self
Microsoft account email. Tokens are cached (and refreshed) in
azalea’s standard cache file unless Self::auth_cache is set,
so interactive login happens at most once per account.
Sourcepub fn auth_cache(self, path: impl Into<PathBuf>) -> Self
pub fn auth_cache(self, path: impl Into<PathBuf>) -> Self
Override the auth token cache path (default:
~/.minecraft/azalea-auth.json, shared with azalea itself).
Sourcepub fn plugin(self, p: Box<dyn ProxyPlugin>) -> Self
pub fn plugin(self, p: Box<dyn ProxyPlugin>) -> Self
Add a frame-level plugin (Forward/Drop/Replace verdicts on raw packets, in registration order — the port of the original’s plugin pipeline).
Sourcepub async fn spawn(self) -> Result<ReflectionProxy>
pub async fn spawn(self) -> Result<ReflectionProxy>
Bind the listener and start accepting clients in the background.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyBuilder
impl !UnwindSafe for ProxyBuilder
impl Freeze for ProxyBuilder
impl Send for ProxyBuilder
impl Sync for ProxyBuilder
impl Unpin for ProxyBuilder
impl UnsafeUnpin for ProxyBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more