HeXuShi.Extensions.JumpToCN 2.2.1

change xx.com or xx.anything to xx.cn,help you jump to cn(china) domain suffix.

There is a newer version of this package available.
See the version list below for details.
Install-Package HeXuShi.Extensions.JumpToCN -Version 2.2.1
dotnet add package HeXuShi.Extensions.JumpToCN --version 2.2.1
<PackageReference Include="HeXuShi.Extensions.JumpToCN" Version="2.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HeXuShi.Extensions.JumpToCN --version 2.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

HeXuShi.Extensions.JumpToCN

nuget install

Demo site

change xx.com or xx.anything to xx.cn,help you jump to cn(china) domain suffix.

No longer based on this project https://github.com/lionsoul2014/ip2region/, But still very grateful lionsoul2014

Because we only need to simply query Chinese ip, so we don't need to pre-install any project files (such as db files).

run test result :

49) ipv4 test:True
runTime:00:00:00.1628871
49) ipv6 test:True
runTime:00:00:00.0010261
48) ipv4 test:True
runTime:00:00:00.0006312
48) ipv6 test:True
runTime:00:00:00.0001385

This project will run into 3 states:

first state:

using HeXuShi.Extensions;

public class Startup
{
    ...
    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        ...
        app.JumpToCN();
        ...
    }
}

When you use China mainland ip access, you will be redirected to the .cn suffix domain name, but if you currently use the .cn suffix domain name to access, regardless of any region's ip access, the current suffix domain name will be maintained.

second state:

using HeXuShi.Extensions;

public class Startup
{
    ...
    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        ...
        app.JumpToCN(".com");
        ...
    }
}

When you use China mainland ip access, you will be redirected to the .cn suffix domain name. If it is a non-Chinese mainland ip access, use the .cn suffix domain name to access, it will jump to the specified .com suffix domain name.

third state:

The current region is not found, the query module has an exception.the current suffix domain name will be maintained.

HeXuShi.Extensions.JumpToCN

nuget install

Demo site

change xx.com or xx.anything to xx.cn,help you jump to cn(china) domain suffix.

No longer based on this project https://github.com/lionsoul2014/ip2region/, But still very grateful lionsoul2014

Because we only need to simply query Chinese ip, so we don't need to pre-install any project files (such as db files).

run test result :

49) ipv4 test:True
runTime:00:00:00.1628871
49) ipv6 test:True
runTime:00:00:00.0010261
48) ipv4 test:True
runTime:00:00:00.0006312
48) ipv6 test:True
runTime:00:00:00.0001385

This project will run into 3 states:

first state:

using HeXuShi.Extensions;

public class Startup
{
    ...
    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        ...
        app.JumpToCN();
        ...
    }
}

When you use China mainland ip access, you will be redirected to the .cn suffix domain name, but if you currently use the .cn suffix domain name to access, regardless of any region's ip access, the current suffix domain name will be maintained.

second state:

using HeXuShi.Extensions;

public class Startup
{
    ...
    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        ...
        app.JumpToCN(".com");
        ...
    }
}

When you use China mainland ip access, you will be redirected to the .cn suffix domain name. If it is a non-Chinese mainland ip access, use the .cn suffix domain name to access, it will jump to the specified .com suffix domain name.

third state:

The current region is not found, the query module has an exception.the current suffix domain name will be maintained.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.0.0 107 10/5/2019
2.2.2 101 8/22/2019
2.2.1 100 8/20/2019
2.2.0 98 8/19/2019