TCP Interface¶
Info
You must have your APRS password in order to connect to a TCP-enabled station. Search online for how to get yours, or check pax25's code to figure out how to generate one.
Warning
Please be mindful of your network configuration, especially your firewall. Anyone with access to the system and port running pax25 will be able to access your station, and potentially any station that station is able to access. This danger is elevated for Internet protocols, which have much lower barrier to entry than radio stations. The APRS password is not real security. It's there as a minimum effort barrier. This interface does not currently support encryption, either, just like most ham radio technologies.
The TCPInterface allows you to connect to other stations over the Internet or your local area network. The interface is unique in that any packet sent to it will be sent to all connected stations. This is noteworthy for two reasons:
- As the addressing schema of IP and AX.25 are incompatible, attempting to determine which addresses 'live' on the other side of any IP would either require extensive sniffing or extended manual assignment, both of which make them error-prone and difficult to maintain.
- By forwarding packets to every connection, we are able to emulate an RF broadcast domain. When transmitting packets over the air, anyone who is in range can hear those packets and know what stations are available. This makes discovering new nodes to play with easy and fun.
You can see a working example of the TCP Interface configuration in the tutorial.
pax25.interfaces.tcp.TCPInterface
¶
Interface for linking pax25 stations over TCP.
Source code in pax25/interfaces/tcp.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
gateway: bool
property
¶
Returns True if this interface can be used to make outbound connections.
listening: bool
property
¶
Returns true if we have any connections still operating.
sudo: bool
property
¶
Returns True if connections on this interface should be considered privileged.
__init__(name: str, settings: TCPSettings, station: Station) -> None
¶
Initialize the TCP Interface.
Source code in pax25/interfaces/tcp.py
build_connections() -> None
¶
Create all the connections for the TCP Interface.
Source code in pax25/interfaces/tcp.py
connection_closed(connection: TCPConnection) -> None
¶
Callback for closing a TCP connection.
Source code in pax25/interfaces/tcp.py
handle_client(reader: StreamReader, writer: StreamWriter) -> None
¶
Set up a connection for an inbound client.
Source code in pax25/interfaces/tcp.py
reload_settings(settings: TCPSettings) -> None
async
¶
send_frame(frame: Frame) -> None
¶
Send a frame out to all the connections which are listening.
shutdown() -> None
async
¶
Close out all connections.
Source code in pax25/interfaces/tcp.py
start() -> None
¶
start_server() -> None
async
¶
Start listening for inbound connections.