@@ -118,7 +118,7 @@ int main ( int argc, char** argv )
118118 bool bNoAutoJackConnect = false ;
119119 bool bUseTranslation = true ;
120120 bool bCustomPortNumberGiven = false ;
121- bool bEnableIPv6 = false ;
121+ bool bDisableIPv6 = false ;
122122 int iNumServerChannels = DEFAULT_USED_NUM_CHANNELS ;
123123 quint16 iPortNumber = DEFAULT_PORT_NUMBER ;
124124 int iJsonRpcPortNumber = INVALID_PORT ;
@@ -262,11 +262,19 @@ int main ( int argc, char** argv )
262262 continue ;
263263 }
264264
265+ // Disable IPv6 ---------------------------------------------------------
266+ if ( GetFlagArgument ( argv, i, " --noipv6" , " --noipv6" ) )
267+ {
268+ bDisableIPv6 = true ;
269+ qInfo () << " - IPv6 disabled" ;
270+ CommandLineOptions << " --noipv6" ;
271+ continue ;
272+ }
273+
265274 // Enable IPv6 ---------------------------------------------------------
266275 if ( GetFlagArgument ( argv, i, " -6" , " --enableipv6" ) )
267276 {
268- bEnableIPv6 = true ;
269- qInfo () << " - IPv6 enabled" ;
277+ qWarning () << " IPv6 is now enabled by default: -6 and --enableipv6 have no effect and are deprecated" ;
270278 CommandLineOptions << " --enableipv6" ;
271279 continue ;
272280 }
@@ -943,7 +951,8 @@ int main ( int argc, char** argv )
943951#ifndef SERVER_ONLY
944952 if ( bIsClient )
945953 {
946- CClient Client ( iPortNumber, iQosNumber, strConnOnStartupAddress, bNoAutoJackConnect, strClientName, bEnableIPv6, bMuteMeInPersonalMix );
954+ CClient
955+ Client ( iPortNumber, iQosNumber, strConnOnStartupAddress, bNoAutoJackConnect, strClientName, bDisableIPv6, bMuteMeInPersonalMix );
947956
948957 // Create Settings with the client pointer
949958 CClientSettings Settings ( &Client, strIniFileName );
@@ -968,14 +977,8 @@ int main ( int argc, char** argv )
968977 }
969978
970979 // GUI object
971- CClientDlg ClientDlg ( &Client,
972- &Settings,
973- strConnOnStartupAddress,
974- bShowComplRegConnList,
975- bShowAnalyzerConsole,
976- bMuteStream,
977- bEnableIPv6,
978- nullptr );
980+ CClientDlg
981+ ClientDlg ( &Client, &Settings, strConnOnStartupAddress, bShowComplRegConnList, bShowAnalyzerConsole, bMuteStream, nullptr );
979982
980983 // show dialog
981984 ClientDlg.show ();
@@ -1014,7 +1017,7 @@ int main ( int argc, char** argv )
10141017 bUseMultithreading,
10151018 bDisableRecording,
10161019 bDelayPan,
1017- bEnableIPv6 ,
1020+ bDisableIPv6 ,
10181021 eLicenceType );
10191022
10201023#ifndef NO_JSON_RPC
@@ -1116,7 +1119,8 @@ QString UsageArguments ( char** argv )
11161119 " -Q, --qos set the QoS value. Default is 128. Disable with 0\n "
11171120 " (see the Jamulus website to enable QoS on Windows)\n "
11181121 " -t, --notranslation disable translation (use English language)\n "
1119- " -6, --enableipv6 enable IPv6 addressing (IPv4 is always enabled)\n "
1122+ " --noipv6 disable IPv6 addressing (IPv4 is always enabled)\n "
1123+ " (recommended to leave IPv6 enabled by default)\n "
11201124 " \n "
11211125 " Server only:\n "
11221126 " -d, --discononquit disconnect all Clients on quit\n "
@@ -1138,7 +1142,8 @@ QString UsageArguments ( char** argv )
11381142 " --norecord set server not to record by default when recording is configured\n "
11391143 " --noraw disable raw audio\n "
11401144 " -s, --server start Server\n "
1141- " --serverbindip IP address the Server will bind to (rather than all)\n "
1145+ " --serverbindip IPv4 address the Server will bind to (rather than all)\n "
1146+ " (only works if IPv6 is unavailable or disabled with --noipv6)\n "
11421147 " -T, --multithreading use multithreading to make better use of\n "
11431148 " multi-core CPUs and support more Clients\n "
11441149 " -u, --numchannels maximum number of channels\n "
0 commit comments