# Class TunnelConfiguration

java.lang.Object
com.codename1.vpn.tunnel.TunnelConfiguration

public final class TunnelConfiguration extends Object

What the tunnel was started with.

Handed to `VpnTunnel.onStart(TunnelConfiguration)`. The addresses and routes are what the PLATFORM was told to set up before any packet arrives; a tunnel reads them to know what it is carrying, and does not set them here -- that is the profile's job.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getData()`
  Whatever the app attached when it started the tunnel, untouched.
  `String[]`
  `getDnsServers()`
  The DNS servers the tunnel provides.
  `int`
  `getMtu()`
  The link MTU, which bounds what `VpnTunnel.forward(PacketBuffer)` can send.
  `String[]`
  `getRoutes()`
  The routes directed into the tunnel, in CIDR form.
  `String`
  `getServer()`
  The tunnel server address.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getServer

    public String getServer()
    The tunnel server address.

  - ### getRoutes

    public String[] getRoutes()
    The routes directed into the tunnel, in CIDR form.

  - ### getDnsServers

    public String[] getDnsServers()
    The DNS servers the tunnel provides.

  - ### getMtu

    public int getMtu()
    The link MTU, which bounds what `VpnTunnel.forward(PacketBuffer)` can send.

  - ### getData

    public String getData()

    Whatever the app attached when it started the tunnel, untouched.

    The way anything the app knows reaches a tunnel without the two having to share a process. See `TunnelSetup.data`.