#[non_exhaustive]pub struct JoinOpts {
pub server_proxy: Option<Proxy>,
pub sessionserver_proxy: Option<Proxy>,
pub custom_server_addr: Option<ServerAddr>,
pub custom_socket_addr: Option<SocketAddr>,
}Expand description
Optional settings when adding an account to a swarm or client.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.server_proxy: Option<Proxy>The SOCKS5 proxy that this bot will use for connecting to the Minecraft server.
sessionserver_proxy: Option<Proxy>The SOCKS5 proxy that will be used when authenticating the bot’s join with Mojang.
This should typically be either the same as Self::server_proxy or
None.
This is useful to set if a server has prevent-proxy-connections
enabled.
custom_server_addr: Option<ServerAddr>Override the server address that this specific bot will send in the handshake packet.
custom_socket_addr: Option<SocketAddr>Override the IP and port that this specific bot will use to connect to the server.
Implementations§
Source§impl JoinOpts
impl JoinOpts
pub fn new() -> Self
pub fn update(&mut self, other: &Self)
Sourcepub fn proxy(self, proxy: Proxy) -> Self
pub fn proxy(self, proxy: Proxy) -> Self
Configure the SOCKS5 proxy used for connecting to the server and for authenticating with Mojang.
To configure these separately, for example to only use the proxy for the
Minecraft server and not for authentication, you may use
Self::server_proxy and Self::sessionserver_proxy individually.
Sourcepub fn server_proxy(self, proxy: Proxy) -> Self
pub fn server_proxy(self, proxy: Proxy) -> Self
Configure the SOCKS5 proxy that will be used for connecting to the Minecraft server.
To avoid errors on servers with the “prevent-proxy-connections” option
set, you should usually use Self::proxy instead.
Also see Self::sessionserver_proxy.
Sourcepub fn sessionserver_proxy(self, proxy: Proxy) -> Self
pub fn sessionserver_proxy(self, proxy: Proxy) -> Self
Configure the SOCKS5 proxy that this bot will use for authenticating the server join with Mojang’s API.
Also see Self::proxy and Self::server_proxy.
Sourcepub fn custom_server_addr(self, server_addr: ServerAddr) -> Self
pub fn custom_server_addr(self, server_addr: ServerAddr) -> Self
Set the custom address that this bot will send in the handshake packet.
Sourcepub fn custom_socket_addr(self, socket_addr: SocketAddr) -> Self
pub fn custom_socket_addr(self, socket_addr: SocketAddr) -> Self
Set the custom resolved address that this bot will use to connect to the server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JoinOpts
impl RefUnwindSafe for JoinOpts
impl Send for JoinOpts
impl Sync for JoinOpts
impl Unpin for JoinOpts
impl UnwindSafe for JoinOpts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().