Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

IPv6 Integration #281

Merged
merged 10 commits into from
Aug 18, 2020
Merged

IPv6 Integration #281

merged 10 commits into from
Aug 18, 2020

Conversation

Likqez
Copy link

@Likqez Likqez commented Jun 11, 2020

In this pr, we're implementing dual stack support. For Ipv4 and 6.

Suggestions and help are welcome, @TheMeinerLP we can work together if you want(added you as collaborator.)

#275

@Likqez
Copy link
Author

Likqez commented Jun 11, 2020

I will start adding it in just to see how it behaves and works. Later i will cleanup the code and customize on the new Worker.

@GiantTreeLP GiantTreeLP marked this pull request as draft June 11, 2020 10:17
@GiantTreeLP GiantTreeLP changed the title WIP: Ipv6 Integration 🚧: Ipv6 Integration Jun 11, 2020
@GiantTreeLP GiantTreeLP added dependencies Pull requests that update a dependency file enhancement New feature or request labels Jun 11, 2020
@GiantTreeLP GiantTreeLP added this to In progress in 2.2.0 via automation Jun 11, 2020
@GiantTreeLP GiantTreeLP added this to In progress in Code quality via automation Jun 11, 2020
@GiantTreeLP GiantTreeLP linked an issue Jun 11, 2020 that may be closed by this pull request
@Likqez
Copy link
Author

Likqez commented Jun 11, 2020

An exception instead of a zero would be better

but one of them can be zero, exception is being thrown if both are zero.
See CloudNetWrapper.java:74 or BungeeCord.java:294

@Likqez
Copy link
Author

Likqez commented Jun 20, 2020

Someone know what's the Problem with NetworkConnection.java:157 in my fork.
Throwing an AbstractChannel$AnnotatedSocketException: Protocol family unavailable: /censor:censor:censor:censor:censor:censor:52be:5d1d:1410 Exception when the InetAddress contains an Ipv6 Address. With Ipv4 all works fine.

Help appreciated ^^

Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 4
- Added 5
           

Complexity increasing per file
==============================
- cloudnet-wrapper/src/main/java/eu/cloudnetservice/cloudnet/v2/wrapper/server/BungeeCord.java  2
- cloudnet-wrapper/src/main/java/eu/cloudnetservice/cloudnet/v2/wrapper/CloudNetWrapperConfig.java  2
         

See the complete overview on Codacy

CloudNetWrapper.getInstance().getWrapperConfig().getCloudnetPort()))
.saveAsConfig(cloudPath.resolve("connection.json"));
} else {
throw new NullPointerException("No CloudNet host defined!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private Optional<String> cloudnet4Host = Optional.empty();
private Optional<String> cloudnet6Host = Optional.empty();

private String internalIP, wrapperId, proxyConfigHost;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this against the code of conduct? Or got it updated?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optionals are not intended for fields

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And yes, we never do multi decalrations in one line

Copy link
Author

@Likqez Likqez Jul 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optionals are not intended for fields

better than always using the getter to get the optional.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this does not correspond to the code style of any kind. Please do it in the getter

CloudNetWrapper.getInstance().getWrapperConfig().getCloudnetPort()))
.saveAsConfig(cloudPath.resolve("connection.json"));
} else {
throw new NullPointerException("No CloudNet host defined!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create your own exception and use it correctly. Runtime Exception with the Logger


if (!host4Name.isPresent() && !host6Name.isPresent()) {
//TODO: Exit or rerequest data
System.exit(0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best replace the exit with a call to a method. Since it may be here that the system does not shut down properly

@@ -69,18 +70,24 @@ public CloudNetWrapper(OptionSet optionSet, CloudNetWrapperConfig cloudNetWrappe

this.wrapperConfig = cloudNetWrapperConfig;
this.cloudNetLogging = cloudNetLogging;

if (!cloudNetWrapperConfig.getCloudnetHost().isPresent()) {
throw new NullPointerException("no cloudnet host defined!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create your own exception and use it correctly. Runtime Exception with the Logger

@derklaro
Copy link
Member

derklaro commented Jul 2, 2020

Not sure if this is ready for a review? @Likqez can you please give a feedback?

@Likqez
Copy link
Author

Likqez commented Jul 2, 2020

I will remove the WIP status if ready. Currently just not much time to contribute.

@derklaro
Copy link
Member

derklaro commented Jul 2, 2020

Gotcha

@GiantTreeLP
Copy link
Member

Is there any progress on this or should I incorporate the changes in this PR into another branch and take over the issue?

@Likqez
Copy link
Author

Likqez commented Aug 18, 2020

There is no progress & no local changes left right now. I just can't find the time and motivation to progress. You could take over.

@GiantTreeLP
Copy link
Member

There is no progress & no local changes left right now. I just can't find the time and motivation to progress. You could take over.

Alright, I will merge this PR into a new branch and continue development there.

@GiantTreeLP GiantTreeLP self-assigned this Aug 18, 2020
@GiantTreeLP GiantTreeLP changed the base branch from development to feature/ipv6 August 18, 2020 15:20
@GiantTreeLP GiantTreeLP changed the title 🚧: Ipv6 Integration IPv6 Integration Aug 18, 2020
@GiantTreeLP GiantTreeLP marked this pull request as ready for review August 18, 2020 15:22
@GiantTreeLP GiantTreeLP merged commit b60f237 into CloudNetService:feature/ipv6 Aug 18, 2020
Code quality automation moved this from In progress to Done Aug 18, 2020
2.2.0 automation moved this from In progress to Done Aug 18, 2020
@GiantTreeLP GiantTreeLP moved this from Done to In progress in Code quality Aug 18, 2020
@GiantTreeLP GiantTreeLP moved this from Done to In progress in 2.2.0 Aug 18, 2020
@GiantTreeLP GiantTreeLP removed this from In progress in Code quality Aug 18, 2020
@GiantTreeLP GiantTreeLP removed this from In progress in 2.2.0 Aug 18, 2020
@GiantTreeLP GiantTreeLP removed this from the Version 2.2.0 - Unknown Block milestone Aug 18, 2020
@GiantTreeLP GiantTreeLP mentioned this pull request Aug 18, 2020
2 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Full IPv6 Support
5 participants