Hi, I'm trying to setup sort of a LAN keep-alive proxy...
Ex.:
- My Xbox 360 is connected strait to my computer via an ethernet cable.
- My computer is connected to the internet via a Wi-Fi adapter.
- Everything works fine and I can access the internet on the Xbox and computer.
Issue:
Every time I start my Xbox I have to set up a "Home or Small Office Network" via the control panel to access the internet. What I would like to do is implement a proxy that when I shutdown the Xbox the LAN doesn't give the "Network Cable Unplugged" notification. I wasn't sure if there was a way to make the connection stay open for so long after it should say unplugged. Such as if I need to restart the system and don't want to have to re-setup the network on the computer. Any ideas?
This is my code to retrieve the network info:
Imports System.Net
Imports System.Net.NetworkInformation
Module Module1
Function GetAllIP(Optional ByVal args As String() = Nothing) As Collection
Dim strHostName As New String("")
Dim col = New Collection
strHostName = Dns.GetHostName()
Console.WriteLine("Host Machine: " & vbTab & strHostName)
Dim ipEntry As IPHostEntry = Dns.GetHostEntry(strHostName)
Dim addr As IPAddress() = ipEntry.AddressList
Dim i As Integer = 0
While i < addr.Length
col.Add(addr(i).ToString())
If i = 0 Then
Console.WriteLine("Host IP:" & vbTab & "{0}", addr(i).ToString())
Else
Console.WriteLine("LAN IP {0}:" & vbTab & "{1}", i, addr(i).ToString())
End If
i += 1
End While
Return col
End Function
Sub Status()
Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
Dim n As NetworkInterface
For Each n In adapters
Console.WriteLine(" {0} = {1}" & vbCrLf & " {2}" & vbCrLf, n.Name, n.OperationalStatus, n.Description.Trim)
Next n
Console.WriteLine()
GetAllIP()
End Sub
Sub Main()
Dim X = 0
While X = 0
Console.Write("Network Detected = ")
If My.Computer.Network.IsAvailable Then
Console.WriteLine("True")
Else
Console.WriteLine("False")
X = 1
End If
Console.WriteLine()
Status()
X = 1
End While
Console.WriteLine()
Console.WriteLine()
Console.WriteLine("EXIT")
Console.ReadLine()
End Sub
End Module
-----------------------------------------------------------------------------------------------
Result(IP masked for security):